Author: kremenek
Date: Tue Nov  2 18:17:51 2010
New Revision: 118111

URL: http://llvm.org/viewvc/llvm-project?rev=118111&view=rev
Log:
Don't add Decls with an invalid location to DeclsInContainer.

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

Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=118111&r1=118110&r2=118111&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Tue Nov  2 18:17:51 2010
@@ -868,7 +868,8 @@
   for (DeclContext::decl_iterator I = D->decls_begin(), E = D->decls_end();
        I!=E; ++I) {
     Decl *subDecl = *I;
-    if (!subDecl || subDecl->getLexicalDeclContext() != D)
+    if (!subDecl || subDecl->getLexicalDeclContext() != D ||
+        subDecl->getLocStart().isInvalid())
       continue;
     DeclsInContainer.push_back(subDecl);
   }


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to