forked from OSchip/llvm-project
Add an additional check for null pointer before accessing PatternDecl.
llvm-svn: 132175
This commit is contained in:
parent
a60cd577fd
commit
0cbb131d8b
|
@ -2341,7 +2341,7 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation,
|
|||
Pattern = PatternDecl->getBody(PatternDecl);
|
||||
}
|
||||
|
||||
if (!Pattern && !PatternDecl->isDefaulted()) {
|
||||
if (!Pattern && PatternDecl && !PatternDecl->isDefaulted()) {
|
||||
if (DefinitionRequired) {
|
||||
if (Function->getPrimaryTemplate())
|
||||
Diag(PointOfInstantiation,
|
||||
|
|
Loading…
Reference in New Issue