aboutsummaryrefslogtreecommitdiff
path: root/lib/Index/ASTLocation.cpp
AgeCommit message (Collapse)Author
2012-04-13Remove the unused, unmaintained, incomplete 'Index' library.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154672 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-11Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie
(Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-20More dead code removal (using -Wunreachable-code)David Blaikie
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148577 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17Remove unnecessary default cases in switches over enums.David Blaikie
This allows -Wswitch-enum to find switches that need updating when these enums are modified. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148281 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-14Change operator<< for raw_ostream and NamedDecl to take a reference instead ↵Benjamin Kramer
of a pointer. Passing a pointer was a bad idea as it collides with the overload for void*. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141971 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-23Removing a bunch of dead returns/breaks after llvm_unreachables.David Blaikie
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140407 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-23Switch assert(0/false) llvm_unreachable.David Blaikie
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-23remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner
LLVM.h imports them into the clang namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-20Renamed misleading getSourceRange -> getLocalSourceRange and ↵Abramo Bagnara
getFullSourceRange -> getSourceRange for TypeLoc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104220 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17Add raw_ostream operators to NamedDecl for convenience. Switch over all ↵Benjamin Kramer
users of getNameAsString on a stream. The next step is to print the name directly into the stream, avoiding a temporary std::string copy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101632 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-18Clone the full Type hierarchy into the TypeLoc hierarchy. NormalizeJohn McCall
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-09-29Modify ASTLocation and apart from being a Decl or Stmt, allow it to also be:Argyrios Kyrtzidis
-A NamedDecl reference -A TypeLoc git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83095 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-29Add more const-goodness to ASTLocation.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83087 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09Remove tabs, and whitespace cleanups.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Find references inside blocks.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77540 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Constify ASTLocation::print.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77532 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21Handle references from ObjCIvarRefExprs.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76507 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20The children statements might be NULL. Check for this case in Zhongxing Xu
isContainedInStatement(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76408 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Introduce ASTLocation::getReferencedDecl(), for getting the declaration that ↵Argyrios Kyrtzidis
the ASTLocation references. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76336 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Handle invalid ASTLocations instead of asserting.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76335 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Make ASTLocation accept a Stmt that is inside an ObjCMethodDecl.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76271 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17As suggested by Argyrios, revert r76159 and make "FindImmediateParent" Zhongxing Xu
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-17Relax the assertion in ASTLocation's ctor: if the decl is not the immediateZhongxing Xu
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-06Some changes to ASTLocation's methodsArgyrios Kyrtzidis
-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-06Move ASTLocation and DeclReferenceMap from the AST library to the Index library.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74859 91177308-0d34-0410-b5e6-96231b3b80d8