diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-09-29 19:44:27 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-09-29 19:44:27 +0000 |
commit | f4526e3fd48248af78b3d59ec36a37bc055b326f (patch) | |
tree | 937143c4352bb089ece89213bf9649d7a2f2e25a /tools/CIndex/CIndex.cpp | |
parent | f352bddf015e537350416c296dd2963524f554f9 (diff) |
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
Diffstat (limited to 'tools/CIndex/CIndex.cpp')
-rw-r--r-- | tools/CIndex/CIndex.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp index d3e37837df..a2719f6fdd 100644 --- a/tools/CIndex/CIndex.cpp +++ b/tools/CIndex/CIndex.cpp @@ -512,8 +512,8 @@ CXCursor clang_getCursor(CXTranslationUnit CTUnit, const char *source_name, ASTLocation ALoc = ResolveLocationInAST(CXXUnit->getASTContext(), SLoc); - Decl *Dcl = ALoc.getDecl(); - Stmt *Stm = ALoc.getStmt(); + Decl *Dcl = ALoc.getParentDecl(); + Stmt *Stm = ALoc.dyn_AsStmt(); if (Dcl) { if (Stm) { if (DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Stm)) { |