diff options
Diffstat (limited to 'lib/Frontend/ASTUnit.cpp')
-rw-r--r-- | lib/Frontend/ASTUnit.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp index 8d2884f750..2496f72bea 100644 --- a/lib/Frontend/ASTUnit.cpp +++ b/lib/Frontend/ASTUnit.cpp @@ -2480,7 +2480,10 @@ static inline bool compLocDecl(std::pair<unsigned, Decl *> L, void ASTUnit::addFileLevelDecl(Decl *D) { assert(D); - assert(!D->isFromASTFile() && "This is only for local decl"); + + // We only care about local declarations. + if (D->isFromASTFile()) + return; SourceManager &SM = *SourceMgr; SourceLocation Loc = D->getLocation(); |