Граф коммитов

15 Коммитов

Автор SHA1 Сообщение Дата
John McCall 51bd803fbd Clone the full Type hierarchy into the TypeLoc hierarchy. Normalize
TypeLoc class names to be $(Type classname)Loc.  Rewrite the visitor.
Provide skeleton implementations for all the new TypeLocs.

Handle all cases in PCH.  Handle a few more cases when inserting
location information in SemaType.

It should be extremely straightforward to add new location information
to existing TypeLoc objects now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84386 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18 01:05:36 +00:00
Argyrios Kyrtzidis f4526e3fd4 Modify ASTLocation and apart from being a Decl or Stmt, allow it to also be:
-A NamedDecl reference
-A TypeLoc

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83095 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 19:44:27 +00:00
Argyrios Kyrtzidis 1ebd7405be Add more const-goodness to ASTLocation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83087 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29 19:39:53 +00:00
Mike Stump 1eb4433ac4 Remove tabs, and whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09 15:08:12 +00:00
Argyrios Kyrtzidis ad6e5d12d0 Find references inside blocks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77540 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29 23:40:48 +00:00
Argyrios Kyrtzidis 6dbbc0e20a Constify ASTLocation::print.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77532 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29 23:39:35 +00:00
Argyrios Kyrtzidis 80ede1d714 Handle references from ObjCIvarRefExprs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76507 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 00:05:38 +00:00
Zhongxing Xu 89021b0c71 The children statements might be NULL. Check for this case in
isContainedInStatement().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76408 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 08:28:49 +00:00
Argyrios Kyrtzidis dc50c64c13 Introduce ASTLocation::getReferencedDecl(), for getting the declaration that the ASTLocation references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76336 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 21:17:58 +00:00
Argyrios Kyrtzidis 9b9685dc71 Handle invalid ASTLocations instead of asserting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76335 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 21:17:43 +00:00
Argyrios Kyrtzidis cc1ccb74c8 Make ASTLocation accept a Stmt that is inside an ObjCMethodDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76271 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 00:33:46 +00:00
Zhongxing Xu 7f66bd28b5 As suggested by Argyrios, revert r76159 and make "FindImmediateParent"
a public static method of ASTLocation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76166 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17 07:36:20 +00:00
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 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 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