summaryrefslogtreecommitdiffstats
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 669ba3ad37..d2e0e6b63b 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -9776,9 +9776,8 @@ void Sema::MarkFunctionReferenced(SourceLocation Loc, FunctionDecl *Func) {
// Instantiate the exception specification for any function which is
// used: CodeGen will need it.
- if (Func->getTemplateInstantiationPattern() &&
- Func->getType()->castAs<FunctionProtoType>()->getExceptionSpecType()
- == EST_Uninstantiated)
+ const FunctionProtoType *FPT = Func->getType()->getAs<FunctionProtoType>();
+ if (FPT && FPT->getExceptionSpecType() == EST_Uninstantiated)
InstantiateExceptionSpec(Loc, Func);
// Implicit instantiation of function templates and member functions of