зеркало из https://github.com/microsoft/clang-1.git
ASTConsumer::handleTopLevelDecl will end up getting called for
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
This commit is contained in:
Родитель
a33849b368
Коммит
66e870029f
|
@ -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();
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
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
|
Загрузка…
Ссылка в новой задаче