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