function template instantiations. Fixes <rdar://problem/
10398005> / PR11312.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143984
91177308-0d34-0410-b5e6-
96231b3b80d8
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();
--- /dev/null
+int main()
+{
+ return 0;
+}
+
+// RUN: c-index-test -write-pch %t.pch -fno-delayed-template-parsing -x c++-header %S/Inputs/reparse-instantiate.h
+// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 5 local -fno-delayed-template-parsing -I %S/Inputs -include %t %s