From 7c6c9e971cdad8cdf9fd33752afd489876188552 Mon Sep 17 00:00:00 2001 From: Sebastian Redl Date: Sun, 6 Mar 2011 10:52:04 +0000 Subject: Reinstate r127112, "Propagate new-style exception spec information to ExtProtoInfo.", this time with the missing header. llvm-svn: 127118 --- clang/lib/Sema/SemaDeclCXX.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'clang/lib/Sema/SemaDeclCXX.cpp') diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 623e72f2998..ba929587aea 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -4712,11 +4712,12 @@ CXXConstructorDecl *Sema::DeclareImplicitDefaultConstructor( } FunctionProtoType::ExtProtoInfo EPI; - EPI.HasExceptionSpec = ExceptSpec.hasExceptionSpecification(); - EPI.HasAnyExceptionSpec = ExceptSpec.hasAnyExceptionSpecification(); + EPI.ExceptionSpecType = ExceptSpec.hasExceptionSpecification() ? + (ExceptSpec.hasAnyExceptionSpecification() ? EST_DynamicAny : EST_Dynamic) : + EST_None; EPI.NumExceptions = ExceptSpec.size(); EPI.Exceptions = ExceptSpec.data(); - + // Create the actual constructor declaration. CanQualType ClassType = Context.getCanonicalType(Context.getTypeDeclType(ClassDecl)); @@ -4989,8 +4990,9 @@ CXXDestructorDecl *Sema::DeclareImplicitDestructor(CXXRecordDecl *ClassDecl) { // Create the actual destructor declaration. FunctionProtoType::ExtProtoInfo EPI; - EPI.HasExceptionSpec = ExceptSpec.hasExceptionSpecification(); - EPI.HasAnyExceptionSpec = ExceptSpec.hasAnyExceptionSpecification(); + EPI.ExceptionSpecType = ExceptSpec.hasExceptionSpecification() ? + (ExceptSpec.hasAnyExceptionSpecification() ? EST_DynamicAny : EST_Dynamic) : + EST_None; EPI.NumExceptions = ExceptSpec.size(); EPI.Exceptions = ExceptSpec.data(); QualType Ty = Context.getFunctionType(Context.VoidTy, 0, 0, EPI); @@ -5387,8 +5389,9 @@ CXXMethodDecl *Sema::DeclareImplicitCopyAssignment(CXXRecordDecl *ClassDecl) { // An implicitly-declared copy assignment operator is an inline public // member of its class. FunctionProtoType::ExtProtoInfo EPI; - EPI.HasExceptionSpec = ExceptSpec.hasExceptionSpecification(); - EPI.HasAnyExceptionSpec = ExceptSpec.hasAnyExceptionSpecification(); + EPI.ExceptionSpecType = ExceptSpec.hasExceptionSpecification() ? + (ExceptSpec.hasAnyExceptionSpecification() ? EST_DynamicAny : EST_Dynamic) : + EST_None; EPI.NumExceptions = ExceptSpec.size(); EPI.Exceptions = ExceptSpec.data(); DeclarationName Name = Context.DeclarationNames.getCXXOperatorName(OO_Equal); @@ -5849,8 +5852,9 @@ CXXConstructorDecl *Sema::DeclareImplicitCopyConstructor( // An implicitly-declared copy constructor is an inline public // member of its class. FunctionProtoType::ExtProtoInfo EPI; - EPI.HasExceptionSpec = ExceptSpec.hasExceptionSpecification(); - EPI.HasAnyExceptionSpec = ExceptSpec.hasAnyExceptionSpecification(); + EPI.ExceptionSpecType = ExceptSpec.hasExceptionSpecification() ? + (ExceptSpec.hasAnyExceptionSpecification() ? EST_DynamicAny : EST_Dynamic) : + EST_None; EPI.NumExceptions = ExceptSpec.size(); EPI.Exceptions = ExceptSpec.data(); DeclarationName Name -- cgit v1.2.3