Commit Graph

117 Commits

Author SHA1 Message Date
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