[cfe-commits] r83099 - /cfe/trunk/tools/CIndex/CIndex.cpp

Argiris Kirtzidis akyrtzi at gmail.com
Tue Sep 29 12:45:58 PDT 2009


Author: akirtzidis
Date: Tue Sep 29 14:45:58 2009
New Revision: 83099

URL: http://llvm.org/viewvc/llvm-project?rev=83099&view=rev
Log:
When pointing at a type decl reference, ASTLocation is a NamedDeclRef.

Modified:
    cfe/trunk/tools/CIndex/CIndex.cpp

Modified: cfe/trunk/tools/CIndex/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/CIndex/CIndex.cpp?rev=83099&r1=83098&r2=83099&view=diff

==============================================================================
--- cfe/trunk/tools/CIndex/CIndex.cpp (original)
+++ cfe/trunk/tools/CIndex/CIndex.cpp Tue Sep 29 14:45:58 2009
@@ -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) {





More information about the cfe-commits mailing list