aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ASTImporter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/ASTImporter.cpp')
-rw-r--r--lib/AST/ASTImporter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/AST/ASTImporter.cpp b/lib/AST/ASTImporter.cpp
index c9968e427a..e196387248 100644
--- a/lib/AST/ASTImporter.cpp
+++ b/lib/AST/ASTImporter.cpp
@@ -1512,8 +1512,10 @@ QualType ASTNodeImporter::VisitFunctionProtoType(const FunctionProtoType *T) {
FunctionProtoType::ExtProtoInfo EPI = T->getExtProtoInfo();
EPI.Exceptions = ExceptionTypes.data();
EPI.NoexceptExpr = Importer.Import(EPI.NoexceptExpr);
- EPI.ExceptionSpecDecl = Importer.Import(EPI.ExceptionSpecDecl);
- EPI.ExceptionSpecTemplate = Importer.Import(EPI.ExceptionSpecTemplate);
+ EPI.ExceptionSpecDecl
+ = cast_or_null<FunctionDecl>(Importer.Import(EPI.ExceptionSpecDecl));
+ EPI.ExceptionSpecTemplate
+ = cast_or_null<FunctionDecl>(Importer.Import(EPI.ExceptionSpecTemplate));
return Importer.getToContext().getFunctionType(ToResultType, ArgTypes.data(),
ArgTypes.size(), EPI);