commit | 419e38bbe2234c65ad2d3381af3e65cda29b991e | [log] [tgz] |
---|---|---|
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | Tue Sep 29 19:45:58 2009 +0000 |
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | Tue Sep 29 19:45:58 2009 +0000 |
tree | c7331c92aed31e9f0f9cfdbc7b37ab58e85c45c0 | |
parent | 05677cae0832e32a2706e20b4378a405cafc8920 [diff] [blame] |
When pointing at a type decl reference, ASTLocation is a NamedDeclRef. llvm-svn: 83099
diff --git a/clang/tools/CIndex/CIndex.cpp b/clang/tools/CIndex/CIndex.cpp index a2719f6..cb870c9 100644 --- a/clang/tools/CIndex/CIndex.cpp +++ b/clang/tools/CIndex/CIndex.cpp
@@ -513,6 +513,8 @@ ASTLocation ALoc = ResolveLocationInAST(CXXUnit->getASTContext(), SLoc); Decl *Dcl = ALoc.getParentDecl(); + if (ALoc.isNamedRef()) + Dcl = ALoc.AsNamedRef().ND; Stmt *Stm = ALoc.dyn_AsStmt(); if (Dcl) { if (Stm) {