Chris Lattner
0e62c1cc0b
remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
...
them into the clang namespace.
llvm-svn: 135852
2011-07-23 10:55:15 +00:00
Abramo Bagnara
1108e7b873
Renamed misleading getSourceRange -> getLocalSourceRange and getFullSourceRange -> getSourceRange for TypeLoc.
...
llvm-svn: 104220
2010-05-20 10:00:11 +00:00
Benjamin Kramer
b11416d061
Add raw_ostream operators to NamedDecl for convenience. Switch over all users of getNameAsString on a stream.
...
The next step is to print the name directly into the stream, avoiding a temporary std::string copy.
llvm-svn: 101632
2010-04-17 09:33:03 +00:00
John McCall
1700197e65
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.
llvm-svn: 84386
2009-10-18 01:05:36 +00:00
Argyrios Kyrtzidis
4cbe85904c
Modify ASTLocation and apart from being a Decl or Stmt, allow it to also be:
...
-A NamedDecl reference
-A TypeLoc
llvm-svn: 83095
2009-09-29 19:44:27 +00:00
Argyrios Kyrtzidis
81aba1fe53
Add more const-goodness to ASTLocation.
...
llvm-svn: 83087
2009-09-29 19:39:53 +00:00
Mike Stump
11289f4280
Remove tabs, and whitespace cleanups.
...
llvm-svn: 81346
2009-09-09 15:08:12 +00:00
Argyrios Kyrtzidis
34be01b9f4
Find references inside blocks.
...
llvm-svn: 77540
2009-07-29 23:40:48 +00:00
Argyrios Kyrtzidis
bc6c64de44
Constify ASTLocation::print.
...
llvm-svn: 77532
2009-07-29 23:39:35 +00:00
Argyrios Kyrtzidis
b78139f74d
Handle references from ObjCIvarRefExprs.
...
llvm-svn: 76507
2009-07-21 00:05:38 +00:00
Zhongxing Xu
34e0370502
The children statements might be NULL. Check for this case in
...
isContainedInStatement().
llvm-svn: 76408
2009-07-20 08:28:49 +00:00
Argyrios Kyrtzidis
d6bf03c272
Introduce ASTLocation::getReferencedDecl(), for getting the declaration that the ASTLocation references.
...
llvm-svn: 76336
2009-07-18 21:17:58 +00:00
Argyrios Kyrtzidis
fb63b0a317
Handle invalid ASTLocations instead of asserting.
...
llvm-svn: 76335
2009-07-18 21:17:43 +00:00
Argyrios Kyrtzidis
38d83defbe
Make ASTLocation accept a Stmt that is inside an ObjCMethodDecl.
...
llvm-svn: 76271
2009-07-18 00:33:46 +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
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
63afa49add
Move ASTLocation and DeclReferenceMap from the AST library to the Index library.
...
llvm-svn: 74859
2009-07-06 21:34:47 +00:00