forked from OSchip/llvm-project
[PCH] Add a null check to avoid crashing.
Unfortunately, no test case. rdar://11960120 llvm-svn: 163566
This commit is contained in:
parent
e27921feb8
commit
e60e408661
|
@ -590,8 +590,10 @@ void ASTDeclReader::VisitFunctionDecl(FunctionDecl *FD) {
|
|||
TemplArgs.size(), C);
|
||||
void *InsertPos = 0;
|
||||
CanonTemplate->getSpecializations().FindNodeOrInsertPos(ID, InsertPos);
|
||||
assert(InsertPos && "Another specialization already inserted!");
|
||||
CanonTemplate->getSpecializations().InsertNode(FTInfo, InsertPos);
|
||||
if (InsertPos)
|
||||
CanonTemplate->getSpecializations().InsertNode(FTInfo, InsertPos);
|
||||
else
|
||||
assert(0 && "Another specialization already inserted!");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue