diff options
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateInstantiateDecl.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp index 701493cf98..3c0d34bd0d 100644 --- a/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -2318,11 +2318,12 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, // Find the function body that we'll be substituting. const FunctionDecl *PatternDecl = Function->getTemplateInstantiationPattern(); Stmt *Pattern = 0; - if (PatternDecl) + if (PatternDecl) { Pattern = PatternDecl->getBody(PatternDecl); - if (!Pattern) - // Try to find a defaulted definition - PatternDecl->isDefined(PatternDecl); + if (!Pattern) + // Try to find a defaulted definition + PatternDecl->isDefined(PatternDecl); + } // Postpone late parsed template instantiations. if (PatternDecl && PatternDecl->isLateTemplateParsed() && |