From 8acb4280c52691aa67d3d98bbfc98e7a6710f369 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Thu, 31 Jul 2014 21:57:55 +0000 Subject: Factor out exception specification information from FunctionProtoType::ExtProtoInfo. Most of the users of these fields don't care about the other ExtProtoInfo bits and just want to talk about the exception specification. llvm-svn: 214450 --- clang/lib/AST/ASTImporter.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'clang/lib/AST/ASTImporter.cpp') diff --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp index b0e0b1dc9e0..395a4884e4b 100644 --- a/clang/lib/AST/ASTImporter.cpp +++ b/clang/lib/AST/ASTImporter.cpp @@ -1622,15 +1622,14 @@ QualType ASTNodeImporter::VisitFunctionProtoType(const FunctionProtoType *T) { ToEPI.HasTrailingReturn = FromEPI.HasTrailingReturn; ToEPI.TypeQuals = FromEPI.TypeQuals; ToEPI.RefQualifier = FromEPI.RefQualifier; - ToEPI.NumExceptions = ExceptionTypes.size(); - ToEPI.Exceptions = ExceptionTypes.data(); - ToEPI.ConsumedParameters = FromEPI.ConsumedParameters; - ToEPI.ExceptionSpecType = FromEPI.ExceptionSpecType; - ToEPI.NoexceptExpr = Importer.Import(FromEPI.NoexceptExpr); - ToEPI.ExceptionSpecDecl = cast_or_null( - Importer.Import(FromEPI.ExceptionSpecDecl)); - ToEPI.ExceptionSpecTemplate = cast_or_null( - Importer.Import(FromEPI.ExceptionSpecTemplate)); + ToEPI.ExceptionSpec.Type = FromEPI.ExceptionSpec.Type; + ToEPI.ExceptionSpec.Exceptions = ExceptionTypes; + ToEPI.ExceptionSpec.NoexceptExpr = + Importer.Import(FromEPI.ExceptionSpec.NoexceptExpr); + ToEPI.ExceptionSpec.SourceDecl = cast_or_null( + Importer.Import(FromEPI.ExceptionSpec.SourceDecl)); + ToEPI.ExceptionSpec.SourceTemplate = cast_or_null( + Importer.Import(FromEPI.ExceptionSpec.SourceTemplate)); return Importer.getToContext().getFunctionType(ToResultType, ArgTypes, ToEPI); } @@ -2712,8 +2711,9 @@ Decl *ASTNodeImporter::VisitFunctionDecl(FunctionDecl *D) { // FunctionDecl that we are importing the FunctionProtoType for. // To avoid an infinite recursion when importing, create the FunctionDecl // with a simplified function type and update it afterwards. - if (FromEPI.ExceptionSpecDecl || FromEPI.ExceptionSpecTemplate || - FromEPI.NoexceptExpr) { + if (FromEPI.ExceptionSpec.SourceDecl || + FromEPI.ExceptionSpec.SourceTemplate || + FromEPI.ExceptionSpec.NoexceptExpr) { FunctionProtoType::ExtProtoInfo DefaultEPI; FromTy = Importer.getFromContext().getFunctionType( FromFPT->getReturnType(), FromFPT->getParamTypes(), DefaultEPI); -- cgit v1.2.3