Commit Graph

116 Commits

Author SHA1 Message Date
Zhongxing Xu 9d05213899 Rename Entity::getName() to Entity::getPrintableName() to make its purpose
more obvious.

llvm-svn: 76167
2009-07-17 07:49:44 +00:00
Zhongxing Xu 3436f58e40 As suggested by Argyrios, revert r76159 and make "FindImmediateParent"
a public static method of ASTLocation.

llvm-svn: 76166
2009-07-17 07:36:20 +00:00
Zhongxing Xu d25ea831b2 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.

llvm-svn: 76159
2009-07-17 06:58:08 +00:00
Argyrios Kyrtzidis 95d401de9d If we are not doing a Debug build, no need for the debugging print methods.
llvm-svn: 76138
2009-07-17 01:20:03 +00:00
Argyrios Kyrtzidis bffa89f42c Check whether the IdentifierInfo is null, before using it.
llvm-svn: 76136
2009-07-17 01:19:03 +00:00
Zhongxing Xu 12b1d137c2 Add getName() method to Entity.
llvm-svn: 75740
2009-07-15 04:39:21 +00:00
Argyrios Kyrtzidis 307b0717f7 In ResolveLocationInAST, handle locations that are inside TagDecl definitions.
llvm-svn: 75594
2009-07-14 03:18:17 +00:00
Argyrios Kyrtzidis a28d145cbb In DeclReferenceMap, map FieldDecls to the MemberExprs that reference them.
llvm-svn: 75593
2009-07-14 03:18:09 +00:00
Chris Lattner c9f6c334f0 fix file headers.
llvm-svn: 75437
2009-07-12 22:33:12 +00:00
Argyrios Kyrtzidis 6dd7181ed4 Simplify a bit by using functions instead of checking enum values. No functionality change.
llvm-svn: 75221
2009-07-10 03:41:26 +00:00
Argyrios Kyrtzidis 3f50f7e853 Refactor DeclLocResolver/StmtLocResolver into a more functional style by removing the search state
and by having their Visit* methods return the ASTLocation directly.

llvm-svn: 74887
2009-07-07 00:53:31 +00:00
Argyrios Kyrtzidis 26e8b9c9c1 Update CMake files.
llvm-svn: 74864
2009-07-06 21:38:29 +00:00
Argyrios Kyrtzidis b8020f0833 Some changes to ASTLocation's methods
-Change hasStmt() to isStmt()
-Add isDecl()
-Add getSourceRange()

llvm-svn: 74862
2009-07-06 21:35:20 +00:00
Argyrios Kyrtzidis f24249554b Move the 'ResolveLocationInAST' function from the Frontend library to the Index library.
Also, cut down its comments; more comments will be added to ASTLocation.

llvm-svn: 74860
2009-07-06 21:35:02 +00:00
Argyrios Kyrtzidis 63afa49add Move ASTLocation and DeclReferenceMap from the AST library to the Index library.
llvm-svn: 74859
2009-07-06 21:34:47 +00:00
Argyrios Kyrtzidis fe37cc831b 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".

llvm-svn: 74802
2009-07-05 22:22:19 +00:00