diff options
| author | Ted Kremenek <kremenek@apple.com> | 2010-11-02 23:17:51 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2010-11-02 23:17:51 +0000 |
| commit | 4bd4d75b9aad1617a6f4e572d7756f5ca22dedbc (patch) | |
| tree | 47cde3688d47a43914a54b2e783d38ba40d0326d /clang | |
| parent | a8b6315cd71dd112178a2cde6d62aa65e25682c2 (diff) | |
| download | bcm5719-llvm-4bd4d75b9aad1617a6f4e572d7756f5ca22dedbc.tar.gz bcm5719-llvm-4bd4d75b9aad1617a6f4e572d7756f5ca22dedbc.zip | |
Don't add Decls with an invalid location to DeclsInContainer.
llvm-svn: 118111
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/tools/libclang/CIndex.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index f4cae89f8fc..d825a400f99 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -868,7 +868,8 @@ bool CursorVisitor::VisitObjCContainerDecl(ObjCContainerDecl *D) { 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); } |

