forked from OSchip/llvm-project
Fix member call on null pointer, found by sanitizer buildbot.
llvm-svn: 279571
This commit is contained in:
parent
0549a39a17
commit
3f6865a8b0
|
@ -3555,9 +3555,11 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation,
|
|||
assert(PatternDecl && "instantiating a non-template");
|
||||
|
||||
const FunctionDecl *PatternDef = PatternDecl->getDefinition();
|
||||
Stmt *Pattern = PatternDef->getBody(PatternDef);
|
||||
if (PatternDef)
|
||||
Stmt *Pattern = nullptr;
|
||||
if (PatternDef) {
|
||||
Pattern = PatternDef->getBody(PatternDef);
|
||||
PatternDecl = PatternDef;
|
||||
}
|
||||
|
||||
// FIXME: We need to track the instantiation stack in order to know which
|
||||
// definitions should be visible within this instantiation.
|
||||
|
|
Loading…
Reference in New Issue