Commit Graph

263 Commits

Author SHA1 Message Date
Axel Naumann
5da6e646a5 Correct licenses in Makefiles. 2014-01-07 11:13:56 +01:00
Axel Naumann
47475c9934 Do not run the test at all on 32bit: it might or might not fail. 2013-12-17 15:29:49 +01:00
Axel Naumann
51f03371e1 Aggregate returns do not work on 32bit; see ROOT-5860. 2013-12-17 13:54:53 +01:00
Axel Naumann
020af968f0 Resolve Elab and TemplSpecTypes; use short name for dtor; test (ROOT-5839). 2013-12-12 21:46:51 +01:00
Vassil Vassilev
318427ba99 Reset the diagnostic client on recovery too. 2013-12-12 14:44:53 +01:00
Axel Naumann
b0fe13d878 Test lifetime handling of StoredValue. 2013-12-11 12:14:52 +01:00
Vassil Vassilev
3751cef9a9 Test canonical specialization removal. 2013-12-11 11:33:13 +01:00
Axel Naumann
490f9084d3 Add test for Interpreter::compileFunction(). 2013-12-09 16:35:01 +01:00
Vassil Vassilev
e054a8126b Test enum constant cleanup. 2013-12-06 12:03:34 +01:00
Vassil Vassilev
b41a282ae6 Add error recovery and unloading tests. 2013-12-06 12:03:33 +01:00
Vassil Vassilev
16b82159ea Revert the unintentional change in test. 2013-11-25 13:56:03 +01:00
Vassil Vassilev
26b0a13f81 Use the correct interface to check for emptiness. 2013-11-25 13:56:02 +01:00
CristinaCristescu
4a8b33b878 ErrorRecovery test. 2013-11-25 13:56:01 +01:00
CristinaCristescu
0490caaa99 Macro recovery 2013-11-25 13:56:00 +01:00
Philippe Canal
3daaffb035 Add missing header 2013-11-19 05:33:55 +01:00
Philippe Canal
c423ae3bc8 Add LookupHelper::findDataMember to retrive a field or variable. 2013-11-19 04:37:11 +01:00
Philippe Canal
388271f9e9 Add cling::LookupHelper::findFunctionTemplate
Given a context and a name (and a constness), return the corresponding
function template decl.
2013-11-13 19:46:00 +01:00
Philippe Canal
e0e2df65e5 Allow findAnyFunction to discover a template instance without any argument hints
This allows to find an existing function template instance even based on only
the template name (of course, in this case, no instantiation is done, only already
existing ones can be returned).

This allows add there same features to TListOfFunctions::FindObject and
TViewAllPublicFunctions::FindObject.
2013-11-13 19:45:59 +01:00
Philippe Canal
baebf42627 Add comment clarifying ROOT-4602 2013-11-06 21:39:56 +01:00
Philippe Canal
27b213ed73 Properly handled (partial) desugaring of 'const NS::Something_t'
TClassEdit::ResolveTypedef was not properly handling the leading const
if there is a namespace in the name (and no template).

Transform::GetPartiallyDesugaredType was not keeping the 'const' in case
the target of the typedef was in the global scope (for example being a
fundamental type).

This fixes ROOT-5576
2013-11-06 21:39:55 +01:00
Philippe Canal
1b8795f0c3 In findFunction*, add template instantiation if needed.
Update the test accordingly.
2013-11-04 14:35:07 +01:00
Philippe Canal
66d3abc12c Add instantiation (if needed) to findAnyFunction 2013-11-04 14:35:06 +01:00
Philippe Canal
0adde75bd2 In findAnyFunction, properly handle the template case.
As the other findFunction*, findAnyFunction does not
(yet?) instantiate the function template if has not
yet been instantiated.

Also add test for findAnyFunction.
2013-11-04 14:35:06 +01:00
Philippe Canal
b96f1409ac In GetPartiallyDesugaredType add support for expression as template parameter.
For example:
namespace edm {
  template <int I> class Hash {};
  const int typeN =1;
  typedef Hash<typeN> ParentageID;
}

edm::ParentageID should be desugared to edm::Hash<1>.
2013-10-30 13:44:58 +01:00
Vassil Vassilev
a08152d576 Enhance the support for removing global values from the module with JIT lock.
When the machine code was generated the JIT retains a lock to the global values
so they don't go out of sync. In the cases of circular references like:
int g();
int f() {g();}
int g() {f();}
we cannot count on the removal order to get rid of the uses. We need to use the
replaceAllUsesWith. This is however tricky because the JIT already generated the
code for f and g and it doesn't make sense to replace anything with anything else.

Thus in order to support that we need to hack one of the JIT callbacks which
prevents the replace of values of already emitted code.
2013-10-29 20:19:24 +01:00
Vassil Vassilev
bf03ba5040 Fail the test because of the dead constant leftover. 2013-10-29 20:19:24 +01:00
Vassil Vassilev
5765fb83f5 Add test for unloading classes. 2013-10-29 20:19:23 +01:00
Vassil Vassilev
64b1a77356 Fix the case when the decl doesn't need mangling, adapt the test to the new impl. 2013-10-29 20:19:23 +01:00
Vassil Vassilev
9b352aa828 Use store/compare state for detailed verification. 2013-10-29 20:19:17 +01:00
Vassil Vassilev
846aac852c Assert that the reference came from the static initializers and upgrade the test.
The compiled code is unloaded by iterating the AST out of which the compiled code
came. The problem is that C++ supports static initialization. For example:
int a = 5; on the global scope means set the value of a to 5 before the program
starts. To support that clang implicitly generates functions that enforce the
expected initialization order. That can become easily very complex. Let's see
a more "real-life" example:

int f() { printf("I am f()"); return 0; }
int a = f();

Besides the code for a and f clang will emit:
define internal void @__cxx_global_var_init() section "__TEXT,__StaticInit,regular,pure_instructions" {
entry:
  %0 = call i32 @__cxa_atexit(void (i8*)* bitcast (void (%"struct.cling::runtime::internal::__trigger__cxa_atexit"*)* @_ZN5cling7runtime8internal21__trigger__cxa_atexitD1Ev to void (i8*)*), i8* getelementptr inbounds (%"struct.cling::runtime::internal::__trigger__cxa_atexit"* @_ZN5cling7runtime8internal1SE, i32 0, i32 0), i8* @__dso_handle) #1
  ret void
}
define internal void @_GLOBAL__I_a() section "__TEXT,__StaticInit,regular,pure_instructions" {
entry:
  call void @__cxx_global_var_init()
  ret void
}

and more importantly:

define internal void @__cxx_global_var_init1() section "__TEXT,__StaticInit,regular,pure_instructions" {
entry:
  %call = call i32 @_Z1fv() ; THAT IS A REFERENCE TO f()
  store i32 %call, i32* undef, align 4
  ret void
}

So when iterating the AST and trying to remove f(), we cannot because it is still
referenced by __cxx_global_var_init1. However we know this is not an issue,
because that __cxx_global_var_init1 was meant to be executed only once and that
already happened. So in first approximation we could drop the references of f
in __cxx_global_var_init1 and remove the rest.
2013-10-29 20:19:12 +01:00
Axel Naumann
4de45c1b85 Add include path. 2013-10-17 12:38:55 +02:00
Axel Naumann
3c7481a11c Not using exceptions anymore thus these now work on 32bit. 2013-10-14 17:10:55 +02:00
Vassil Vassilev
694a0e4c3f Update the CHECK-NOT clause. 2013-10-14 11:48:55 +02:00
Vassil Vassilev
3d7b328517 Add future tests for implicit auto, when it gets fully adopted in cling.
The adoption should be done soon.
2013-10-14 09:11:40 +02:00
Vassil Vassilev
e43a6a6816 Fix broken by construction test. 2013-10-14 09:11:39 +02:00
Vassil Vassilev
2ce823fbef We don't need -verify. 2013-10-14 09:11:39 +02:00
Vassil Vassilev
eade01b61f Check against the new message printed out if there were differences. 2013-10-14 09:11:39 +02:00
Vassil Vassilev
a1395d0401 Revert the right cached files even when there are macros involved.
Fix the semantic of the test.
2013-10-14 09:11:39 +02:00
Vassil Vassilev
a0df2fac1d Add the -I so that Redeclarables.h can be found. 2013-10-14 09:11:39 +02:00
Vassil Vassilev
41b0539819 Don't forget to add FileCheck. 2013-10-14 09:11:39 +02:00
Vassil Vassilev
559b978279 Fix test semantics. 2013-10-14 09:11:39 +02:00
Vassil Vassilev
26eec6ab21 Now expected errors are printed out and filecheck cannot skip them. This is actually an improvement in newest llvm. In that case we don't need to run the test twice. 2013-10-14 09:11:38 +02:00
Vassil Vassilev
ffa77e6521 We cannot forward declare a function inside a function. 2013-10-14 09:11:38 +02:00
Axel Naumann
84b49183f3 Adapt to new diag format. 2013-10-03 09:54:00 +02:00
Vassil Vassilev
069a9d76c1 Remove unnecessary files that used to 'steer' the testsuite. 2013-09-27 14:33:05 +02:00
Vassil Vassilev
c31d15a1a1 Update cling's testsuite to use the newest llvm lit. 2013-09-27 14:33:04 +02:00
Baozeng Ding
fc98551c43 Add more tests testing derefs in BinOps and Casts. 2013-09-25 10:07:06 +02:00
Vassil Vassilev
c512b9abf4 No need of cleanup in the testsuite - we use temporary uniquely named files. 2013-09-18 20:33:05 +02:00
Vassil Vassilev
bcb3aaa6ae Disable tests on SLC6 32 bit. 2013-09-13 15:25:01 +02:00
Vassil Vassilev
1ddf4093b9 Extend the AST null deref checher and disable the IR checker.
This resulted in one change of warning kind, which is expected. I disabled the
test MetdhoCalls, Baozeng will look at it once he gets the code.
2013-09-11 13:50:57 +02:00
Baozeng Ding
a62759105c Add support for int *p = 0; *p; at AST level. 2013-09-10 11:43:57 +02:00
Baozeng Ding
a46498e831 Adapt the test suite to the new warnings produced.
Disable the indirect calls. We don't support them yet on AST level.
2013-09-09 15:38:51 +02:00
Vassil Vassilev
342918a4b9 Adapt to _Bool -> bool Use reg expr, because when building cling standalone we should still get _Bool. 2013-09-05 19:08:56 +02:00
Philippe Canal
7b7e237d81 adapt to new interface 2013-09-03 15:26:56 +02:00
Philippe Canal
f13c81470a We must have a function implementation to take its address 2013-08-31 20:49:07 +02:00
Philippe Canal
fc90db23ba In ReturnSynthesizer add better support for RecordType.
When we dectect that the last expression is a record type and is not
a temporary, we now return it by reference, hence avoiding an unnecessary
and sometimes impossible (cout) copy.   If it is a temporary we still
return a 'copy'.
2013-08-31 20:49:07 +02:00
Philippe Canal
52da28145b Fix ROOT-5442, wrong normalization of std::vector<myNamespace::myClass1*>::const_iterator
GetPartiallyDesugaredType was 'forgetting' to add full qualification of the
template parameters in some case (where the template paramter in the
QualType was not yet an elaborated type).  Extend the internal interface to
distinguish when we need to add full qualification to the type itself or its
template parameters.
2013-08-29 08:59:59 +02:00
Philippe Canal
467cb93b3e Add support for lookup function from QualType(s).
Add new overload for findFunctionProto and matchFunctionProto which rather than
taking the list of argument types as a StringRef, take it as a
const llvm::SmallVector<clang::QualType, 4>.  This avoids the (permanent)
allocations inside clang due to the Parsing of types.
2013-08-26 00:10:54 +02:00
Jerome Beclin
162101dd9d Instrument the error recovery testsuite with .store- and .compare- State.
Add a special lit substitution giving us the executed test folder, so that
before next run we could cleanup.
2013-08-21 14:29:57 +02:00
Baozeng Ding
715e222957 Add support for null deref checks in indirect calls. 2013-08-21 11:34:51 +02:00
Baozeng Ding
cc877954ae Add support for mangling: How we can check regular C++ functions.
Indirect calls are still an issue.
2013-08-21 11:14:55 +02:00
Philippe Canal
39d8a3e8a6 Add matchFunctionProto returning the decl only in case of exact match.
The new call is:

const clang::FunctionDecl* matchFunctionProto(const clang::Decl* scopeDecl,
                                              llvm::StringRef funcName,
                                              llvm::StringRef funcProto,
                                              bool objectIsConst
                                              ) const;

and the function must match in name and prototype (including constness).
The only thing not checked is the actual declaration context.
2013-08-17 01:45:56 +02:00
Philippe Canal
31b60e0ab5 Add support for restricting the function search to const functions.
Add an optional argument objectIsConst to findFunctionArgs and
findFunctionProto:

   const clang::FunctionDecl* findFunctionProto(const clang::Decl* scopeDecl,
                                                llvm::StringRef funcName,
                                                llvm::StringRef funcProto,
                                                bool objectIsConst) const;

   const clang::FunctionDecl* findFunctionArgs(const clang::Decl* scopeDecl,
                                               llvm::StringRef funcName,
                                               llvm::StringRef funcArgs,
                                               bool objectIsConst) const;
2013-08-17 01:45:55 +02:00
Vassil Vassilev
f3ccb10135 Spell correctly expected-warning and not warning expected. Call a function with non null and check the expected result. 2013-08-16 22:52:52 +02:00
Baozeng Ding
eca58d0ffc Add support for the cases where the pointer is not char*. 2013-08-16 19:50:53 +02:00
Vassil Vassilev
76c598f0ff Uncomment commented lines, that fail on Mac. 2013-08-15 23:17:51 +02:00
Vassil Vassilev
452e98bf46 Add a reproducer in the test of a current issue for Baozeng to look into.
This happens probably because we don't iterate over the redecl chains and thus
we don't pickup the attribute.
2013-08-15 23:17:51 +02:00
Vassil Vassilev
eeb99d7030 Add failing test for Baozeng to fine tune the NullDeref impl. 2013-08-15 22:26:57 +02:00
Vassil Vassilev
694eb20c36 Mark back as non-failing. There is still some issue on Mac that need to be investigated. 2013-08-15 10:15:55 +02:00
Vassil Vassilev
914c09228e Mark test as XFAIL. Follow the cling naming convention. 2013-08-15 09:49:59 +02:00
Baozeng Ding
4f70eafbfd Add a simple test testing the new functionality. 2013-08-14 21:05:55 +02:00
Vassil Vassilev
ecf7e03df8 Not using real SourceLocation is bad, especially in -verify mode. In the value printer synthesis we have real source location of the expression that we are replacing. Use its begin and end location. This will allow us to remove the XFAIL-ed test that now passes. 2013-08-08 22:55:54 +02:00
Vassil Vassilev
6c734dd78c Only if I could spell C++ :) 2013-08-08 16:59:55 +02:00
Vassil Vassilev
a0850bbf4c Add another expected to pass construct for null deref. 2013-08-08 15:01:54 +02:00
Vassil Vassilev
03356f0dc7 Call exit. This will do the extra sanity checks. 2013-08-07 17:58:57 +02:00
Vassil Vassilev
8a6adff938 Make sure that the value is valid.a 2013-08-07 17:58:57 +02:00
Vassil Vassilev
96dbd7d963 Remove the expected error. We don't expect error there. The declared function has an address, which could be evaluated. 2013-08-07 17:58:57 +02:00
Vassil Vassilev
66514e8d09 Add an XFAIL-ing test, as TODO for Baozeng. 2013-08-07 17:58:56 +02:00
Vassil Vassilev
9bb1eae342 We check whether there is terminal attached and if not (as the case of the testsuite) we don't need to answer the warning. 2013-08-07 17:58:56 +02:00
Baozeng Ding
8e17b5e93e Report the null deref warning through diagnostic engine. 2013-07-27 20:43:03 +02:00
Vassil Vassilev
5b2655d120 Add testcases. 2013-07-21 15:16:57 +02:00
Vassil Vassilev
6604b6b763 Some transactions don't have a wrapper. 2013-06-25 09:30:32 +02:00
Vassil Vassilev
78ea68614a Fix syntax errors in the test.
I DO NOT STILL UNDERSTAND HOW THAT WAS HIDDEN BY CLING's TESTSUITE. We should
investigate seriously these issues.
2013-06-25 09:30:32 +02:00
Vassil Vassilev
92098d2046 Add XFAILing test, exposing issue ROOT-5248. 2013-06-25 09:30:31 +02:00
Vassil Vassilev
92415de6bd Do not value print dynamic expressions when they are in a inner compound stmt. 2013-06-05 16:26:51 +02:00
Vassil Vassilev
ee94c07f14 Be more verbose for the test. Explicitly request dyn scopes. 2013-06-05 16:26:50 +02:00
Vassil Vassilev
d5cf020d2b Add future test, checking the unnamed macro support. 2013-06-05 16:26:50 +02:00
Axel Naumann
925cdd2400 Update to git "version" (which currently is "$Id$"...) 2013-05-08 15:38:21 +02:00
Axel Naumann
9c6c792a8d dos2unix 2013-05-03 14:14:17 +02:00
Axel Naumann
56e2be3e6f Add library path.
git-svn-id: http://root.cern.ch/svn/root/trunk@49350 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-25 16:22:23 +00:00
Axel Naumann
70695fe2be Update to clang/llvm r179269 (llvm vendor branch r49215):
Parser::Scope versus Sema::DeclContext are now checked for cross-vailidity.
Emit the TU-transaction explicitly instead of relying on a first transaction.
The typename extraction now takes a stream instead of a string to write to.
The llvm::Linker has much reduced functionality; use llvm::sys::Path instead to find dynamic libraries.


git-svn-id: http://root.cern.ch/svn/root/trunk@49325 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-24 16:28:08 +00:00
Vassil Vassilev
fc0f602a9e Add more checks.
git-svn-id: http://root.cern.ch/svn/root/trunk@49319 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-24 15:01:35 +00:00
Vassil Vassilev
4a809957be Add test.
git-svn-id: http://root.cern.ch/svn/root/trunk@49316 27541ba8-7e3a-0410-8455-c3a389f83636
2013-04-24 13:12:08 +00:00
Vassil Vassilev
f65fafc648 Add test exposing weakness in LookupHelper::findFunctionProto
git-svn-id: http://root.cern.ch/svn/root/trunk@48909 27541ba8-7e3a-0410-8455-c3a389f83636
2013-03-20 15:22:51 +00:00
Vassil Vassilev
03cac10cfd Now we don't do execute("gCling = (cling::Interpreter*)some_ptr") at startup.
This cause the number of unique wrappers to decrease by 1. 

Fix the test correspondingly.


git-svn-id: http://root.cern.ch/svn/root/trunk@48854 27541ba8-7e3a-0410-8455-c3a389f83636
2013-03-09 20:12:35 +00:00
Vassil Vassilev
99dfb99f35 Do not print the address of the temporary value of an enum constants.
For example, when we have enum e {e1=1}; and we do e1 on the prompt we got the 
address of e1 and we printed it out. However, this doesn't make sence because we
cannot use it later, because it is destroyed.


git-svn-id: http://root.cern.ch/svn/root/trunk@48850 27541ba8-7e3a-0410-8455-c3a389f83636
2013-03-07 23:29:10 +00:00
Philippe Canal
ea36f5aa5d Attempt to fix the test on 32 bits platforms
git-svn-id: http://root.cern.ch/svn/root/trunk@48801 27541ba8-7e3a-0410-8455-c3a389f83636
2013-03-02 02:38:59 +00:00
Philippe Canal
5b7940b35d add more test with qualifications
git-svn-id: http://root.cern.ch/svn/root/trunk@48795 27541ba8-7e3a-0410-8455-c3a389f83636
2013-03-01 19:05:54 +00:00
Axel Naumann
451a0e5066 Dynamic lookup: replacing something in the condition doesn't mean that we should give up; there might be more to replace in the then / else parts.
Add a tests for that.
Fix involuntary test (using an undeclared printf) by fwd declaring printf.


git-svn-id: http://root.cern.ch/svn/root/trunk@48787 27541ba8-7e3a-0410-8455-c3a389f83636
2013-03-01 15:13:01 +00:00
Philippe Canal
6f8d8f8d71 Missed a spot in r48782
git-svn-id: http://root.cern.ch/svn/root/trunk@48784 27541ba8-7e3a-0410-8455-c3a389f83636
2013-03-01 12:29:22 +00:00
Philippe Canal
214fc4f963 We now are stripping the elaborated type so, no more :: prefix
git-svn-id: http://root.cern.ch/svn/root/trunk@48782 27541ba8-7e3a-0410-8455-c3a389f83636
2013-03-01 11:28:35 +00:00
Philippe Canal
e869ee0993 Add testing of the desugaring behavior of typdef inside std
git-svn-id: http://root.cern.ch/svn/root/trunk@48577 27541ba8-7e3a-0410-8455-c3a389f83636
2013-02-14 17:45:49 +00:00
Philippe Canal
a7f6d5c3c9 Finish 48510 SubstTemplateTypeParmType can indeed carry meaningfull qualifier (also add related test)
git-svn-id: http://root.cern.ch/svn/root/trunk@48549 27541ba8-7e3a-0410-8455-c3a389f83636
2013-02-12 18:38:58 +00:00
Philippe Canal
b218b89d4c In the partial desugaring add support for the case where we have a type that point to an already completely desugared template instantiation in which case the type is a RecordDecl rather than a TemplateInstantationType
git-svn-id: http://root.cern.ch/svn/root/trunk@48510 27541ba8-7e3a-0410-8455-c3a389f83636
2013-02-07 22:56:10 +00:00
Vassil Vassilev
1ae610b211 Fix savannah #99234.
The issue we experienced is that we couldn't pipe the output in the terminal.
The reason is that we were using llvm::outs() which closes explicitly the file
descriptor (thanks Axel for the help debugging).
We introduce our custom stream, which keeps the file descriptor open so that
we can use it in pipes. For debugging purposes, however we use/should use llvm::errs()

The lesson learned:
DONT USE LLVM::OUTS() ANYMORE!


git-svn-id: http://root.cern.ch/svn/root/trunk@48316 27541ba8-7e3a-0410-8455-c3a389f83636
2013-01-17 15:27:14 +00:00
Philippe Canal
444ffb02a8 Now that we sometimes desugar things directly in std, we need to explicitly not desugar std::string
git-svn-id: http://root.cern.ch/svn/root/trunk@48208 27541ba8-7e3a-0410-8455-c3a389f83636
2013-01-06 17:06:31 +00:00
Vassil Vassilev
a81a028269 Add simpler testcase. The test is marked as XFAIL because of another bug.
git-svn-id: http://root.cern.ch/svn/root/trunk@48121 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-19 10:59:04 +00:00
Philippe Canal
40895f8595 Better version of the output
git-svn-id: http://root.cern.ch/svn/root/trunk@47965 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-11 10:41:56 +00:00
Philippe Canal
d267a7e10e In the GetPartiallyDesugaredType, properly handle the case where the input is partially qualified (input: B::C and the ouput needs to be A::B::C ; i.e. properly handle ElaboratedType as input). Also properly strip the typedef from any of the scopes (A::vecint::iterator -> std::vector<int>::iterator). Add the corresponding test
git-svn-id: http://root.cern.ch/svn/root/trunk@47958 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-11 08:26:00 +00:00
Paul Russo
aa524c6ad7 Fix typo introduced by revision 46455.
git-svn-id: http://root.cern.ch/svn/root/trunk@47872 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-06 07:22:16 +00:00
Axel Naumann
dac8f76e3e Showcase https://savannah.cern.ch/bugs/index.php?99210
and likely also https://savannah.cern.ch/bugs/?99234
Use a test case where RAII is enforced and copying is not an option (instance count).


git-svn-id: http://root.cern.ch/svn/root/trunk@47847 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-05 11:12:52 +00:00
Vassil Vassilev
8040f69fc3 Fix the test. In that particular case in ReturnSynthesizer we check whether the
type is trivially copiable and cling::StoredValueRef is not.
We could check for a copy ctor (which is defined in that type), however, that is
not important at the moment. We can readd that logic on use-case.


git-svn-id: http://root.cern.ch/svn/root/trunk@47825 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-04 16:10:48 +00:00
Vassil Vassilev
8910e774e6 Still expected to fail (unfortunatelly)
git-svn-id: http://root.cern.ch/svn/root/trunk@47824 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-04 15:43:55 +00:00
Vassil Vassilev
32751e08ff Remove now redundant code.
git-svn-id: http://root.cern.ch/svn/root/trunk@47823 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-04 15:42:01 +00:00
Vassil Vassilev
38a05dd1df We don't need to add header search path for that particular test.
git-svn-id: http://root.cern.ch/svn/root/trunk@47779 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-02 19:25:49 +00:00
Vassil Vassilev
a530a63d15 Readd custom meta command support.
git-svn-id: http://root.cern.ch/svn/root/trunk@47776 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-02 19:01:02 +00:00
Philippe Canal
6fbf8745a2 Add minimal test of findClassTemplate
git-svn-id: http://root.cern.ch/svn/root/trunk@47773 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-02 06:50:03 +00:00
Vassil Vassilev
1a07e07155 Add sane test case testing capital x.
git-svn-id: http://root.cern.ch/svn/root/trunk@47757 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-01 13:07:07 +00:00
Vassil Vassilev
810fd5f060 Make sure that we have proper case preventing such scenario as from today.
git-svn-id: http://root.cern.ch/svn/root/trunk@47754 27541ba8-7e3a-0410-8455-c3a389f83636
2012-12-01 01:14:53 +00:00
Vassil Vassilev
8cf9ab9121 Add test case for an item on my TODO list.
git-svn-id: http://root.cern.ch/svn/root/trunk@47516 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-21 01:15:58 +00:00
Axel Naumann
c197c04fb6 DiagConsumer::Begin/EndSourceFile() are used to switch from "parsing command line flags" to "parsing source files" more; not to signal a new source file to the diag client.
Switch BeginSourceFile() on after having parsed Interpreter internals.
Switch it off (EndSourceFile()) in ~Interpreter.
Indentation.

Now that we handle diags appropriately, test/ErrorRecovery/MetaProcessor.C fails; repair it.


git-svn-id: http://root.cern.ch/svn/root/trunk@47476 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-20 13:21:00 +00:00
Axel Naumann
1546d01ca3 Make test more verbose; fix directory for library.
git-svn-id: http://root.cern.ch/svn/root/trunk@47430 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-19 10:59:40 +00:00
Vassil Vassilev
9fce4384b9 Add test exposing the problem with the partial code generation.
git-svn-id: http://root.cern.ch/svn/root/trunk@47417 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-18 22:56:46 +00:00
Axel Naumann
10c0ac8711 Don't free all JITted functions, only those that are referencing an unresolved symbol.
Thus also no need anymore to collect all jitted functions through a function JIT listener.
Sadly, recompilation of them will pick up the existing stub instead of actually recompiling.
Don't use StringRef.data() where we need a 0-terminated string for FindFunctionNamed().
Be explicit about what symbol is triggering an unresolved symbol.
Update test suite.


git-svn-id: http://root.cern.ch/svn/root/trunk@47398 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-17 16:28:14 +00:00
Axel Naumann
47c2be1200 Handle ValuePrinting of char* 0 without crashing.
git-svn-id: http://root.cern.ch/svn/root/trunk@47378 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-16 20:25:34 +00:00
Axel Naumann
f0f33b18b4 Test array printing
git-svn-id: http://root.cern.ch/svn/root/trunk@47175 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-11 17:17:27 +00:00
Axel Naumann
bb0cacfb13 More rvalue-const removal
git-svn-id: http://root.cern.ch/svn/root/trunk@47173 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-11 16:38:14 +00:00
Axel Naumann
716729e5eb Don't append "const" for rvalues for increased CINT compatibility.
Might re-introduce later.


git-svn-id: http://root.cern.ch/svn/root/trunk@47171 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-11 16:15:35 +00:00
Axel Naumann
909bc42884 [5] now becomes * because we use the wrapper return type.
git-svn-id: http://root.cern.ch/svn/root/trunk@47170 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-11 16:13:02 +00:00
Axel Naumann
2f0d47e0b7 Teach the ValuePrinter to print arrays.
Accept that Value's type is not the last Expr's type (e.g. const char[5]) but whatever the wrapper returns, (e.g. const char*).
Print StoredValueRefs recursively.
Add mechanism to suppress newlines (improves readability for nested calls)


git-svn-id: http://root.cern.ch/svn/root/trunk@47169 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-11 16:05:30 +00:00
Axel Naumann
3b59fceed9 Test r47166:
return 12;
as alterative to
12;


git-svn-id: http://root.cern.ch/svn/root/trunk@47168 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-11 14:06:03 +00:00
Axel Naumann
0269fc8b08 Add test for r47002: ValuePrinting of function ptrs.
git-svn-id: http://root.cern.ch/svn/root/trunk@47003 27541ba8-7e3a-0410-8455-c3a389f83636
2012-11-02 13:40:27 +00:00
Vassil Vassilev
e5b8645bda Disable test for now.
Right now the issue is not that urgent. We will have to revisit and rethink the
test case.


git-svn-id: http://root.cern.ch/svn/root/trunk@46859 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-27 22:20:01 +00:00
Vassil Vassilev
d70f4b6173 Fix broken by construction test.
git-svn-id: http://root.cern.ch/svn/root/trunk@46858 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-27 21:42:00 +00:00
Vassil Vassilev
2908e7f9e4 Do not issue error in case: .x MyFile() - where no string is between the parenthesis.
git-svn-id: http://root.cern.ch/svn/root/trunk@46851 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-27 19:57:29 +00:00
Philippe Canal
d1f4b8c39e Add code and testing for classes declared inside an anymous namespace
git-svn-id: http://root.cern.ch/svn/root/trunk@46841 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-26 19:51:56 +00:00
Vassil Vassilev
4fd8ccc00d Rollback the transaction if there is an error occurred in one of the transformers.
git-svn-id: http://root.cern.ch/svn/root/trunk@46826 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-26 12:56:49 +00:00
Axel Naumann
835bb9fa1c Try to fix intermittent test failure (library not yet built)
git-svn-id: http://root.cern.ch/svn/root/trunk@46730 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-23 07:25:45 +00:00
Philippe Canal
e60b8ce424 extend testing of typedef to reference
git-svn-id: http://root.cern.ch/svn/root/trunk@46679 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 13:33:38 +00:00
Vassil Vassilev
d132d3d5ba evaluate now builds DeclRefExpr if there is DeclStmt.
Don't run the wrapper function when the transaction was rolled back.


git-svn-id: http://root.cern.ch/svn/root/trunk@46674 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 12:23:34 +00:00
Vassil Vassilev
5b30c1e744 Why we didn't see that before. FileCheck is consuming the issued diagnostics,
which per se is terrible...


git-svn-id: http://root.cern.ch/svn/root/trunk@46669 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-19 10:07:41 +00:00
Vassil Vassilev
7f6039444b When we evaluate we *must* provide a value where the evaluated result to be stored
git-svn-id: http://root.cern.ch/svn/root/trunk@46642 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 12:24:04 +00:00
Vassil Vassilev
f48a4881cd Add super efficient execute function. It doesn't do any fancy things with the
declarations - it just compiles and runs given expression or statement.


git-svn-id: http://root.cern.ch/svn/root/trunk@46636 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 11:56:20 +00:00
Vassil Vassilev
ff1861cfc2 Lit runs cling with --nologo.
git-svn-id: http://root.cern.ch/svn/root/trunk@46635 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 11:55:04 +00:00
Vassil Vassilev
2b27986ff9 Totally wrong assumptions. Pipe everything in FileCheck and we are done.
git-svn-id: http://root.cern.ch/svn/root/trunk@46633 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 10:25:24 +00:00
Vassil Vassilev
e8560dc77f This is definitely expected to fail.
git-svn-id: http://root.cern.ch/svn/root/trunk@46630 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-18 09:35:38 +00:00
Axel Naumann
a4ec8a554f Check for variables injected throug process being available on the prompt.
Check that redecl causes an error -- only the whole verify thing doesn't actually verify!
Also, the initializer should end up in the Value returned by evaluate; it's not!


git-svn-id: http://root.cern.ch/svn/root/trunk@46626 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-17 21:34:59 +00:00
Vassil Vassilev
21da904ea7 Make sure that the bug won't be reintroduced again.
git-svn-id: http://root.cern.ch/svn/root/trunk@46550 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-15 13:57:36 +00:00
Vassil Vassilev
c5a8df6c88 Prepare cling for fixing bug #98146. In principle the bug could be fixed in 10
seconds, but I don't like where EvaluateInternal is going.
At first place it shouldn't do any smart guessing what the transformers would do.
Second it shouldn't try to attach expression evaluation (storing the result in 
cling::Value) while preparing for value printing.

To sum up:
* Simplify the old craft in EvaluateInternal
  - Move the value printing logic into the value printer transformer. 
  - Move the expression evaluation login (mainly coming through the 
Interpreter::evaluate interface) into separate transformer.
* Attach the new transformer to the list of transformers (the size of it was 
increased as well.)
* Add new compilation option switch that the new transformer will react on.
* Turn on the switch where necessary.
* Simplify value printer logic. Now everything is at one place, which makes it
simpler and easier to debug.
* Make IncrementalParser::Parse to take compilation options' reference instead of
constructing it's own.
* As consequence of the new implementation - two bugs in the testsuite were 
uncovered. Propose a fix for them.
* Improve documentation.
* TODO: There is some code duplication, which will be factored out soon.


git-svn-id: http://root.cern.ch/svn/root/trunk@46549 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-15 13:42:09 +00:00
Philippe Canal
0701fb4621 Update the test now that lookupFuncProto does overload resolution. Explicitly test paramter that are reference to object. Test case where we request only the non defaulted argument.
git-svn-id: http://root.cern.ch/svn/root/trunk@46455 27541ba8-7e3a-0410-8455-c3a389f83636
2012-10-11 00:07:55 +00:00