Zhongxing Xu
adfc8d14ce
Relax the assertion in ASTLocation's ctor: if the decl is not the immediate
...
parent of the stmt, find the immediate parent for the stmt.
This is because sometimes we cannot get the immediate decl of the stmt when
creating the ASTLocation. We can only get a parent of the stmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76159 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 06:58:08 +00:00
Argyrios Kyrtzidis
ada45428b6
If we are not doing a Debug build, no need for the debugging print methods.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76138 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 01:20:03 +00:00
Argyrios Kyrtzidis
dc0b11ef5d
Check whether the IdentifierInfo is null, before using it.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76136 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 01:19:03 +00:00
Zhongxing Xu
53363b26d2
Add getName() method to Entity.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75740 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 04:39:21 +00:00
Argyrios Kyrtzidis
2e46aeef8b
In ResolveLocationInAST, handle locations that are inside TagDecl definitions.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75594 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 03:18:17 +00:00
Argyrios Kyrtzidis
9e6bc0657e
In DeclReferenceMap, map FieldDecls to the MemberExprs that reference them.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75593 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 03:18:09 +00:00
Chris Lattner
c3a6540f17
fix file headers.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75437 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-12 22:33:12 +00:00
Argyrios Kyrtzidis
a6488a14be
Simplify a bit by using functions instead of checking enum values. No functionality change.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75221 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 03:41:26 +00:00
Argyrios Kyrtzidis
bd2ab6e8f6
Refactor DeclLocResolver/StmtLocResolver into a more functional style by removing the search state
...
and by having their Visit* methods return the ASTLocation directly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74887 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-07 00:53:31 +00:00
Argyrios Kyrtzidis
0daea7a162
Update CMake files.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74864 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 21:38:29 +00:00
Argyrios Kyrtzidis
755c6b4215
Some changes to ASTLocation's methods
...
-Change hasStmt() to isStmt()
-Add isDecl()
-Add getSourceRange()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74862 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 21:35:20 +00:00
Argyrios Kyrtzidis
818e15b89f
Move the 'ResolveLocationInAST' function from the Frontend library to the Index library.
...
Also, cut down its comments; more comments will be added to ASTLocation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74860 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 21:35:02 +00:00
Argyrios Kyrtzidis
ccbcb70ee9
Move ASTLocation and DeclReferenceMap from the AST library to the Index library.
...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74859 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-06 21:34:47 +00:00
Argyrios Kyrtzidis
9eec4ed6ca
Introduce the 'Index' library.
...
Its purpose is to provide the basic infrastructure for cross-translation-unit analysis like indexing, refactoring, etc.
Currently it is very "primitive" and with no type-names support. It can provide functionality like
"show me all references of this function from these translation units".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74802 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-05 22:22:19 +00:00