diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-07-31 21:57:55 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-07-31 21:57:55 +0000 |
| commit | 8acb4280c52691aa67d3d98bbfc98e7a6710f369 (patch) | |
| tree | c8c6fea174a68d3f36c80f21c2649cca64d7d3ef /clang/lib/Sema/SemaExprCXX.cpp | |
| parent | 67474e3755d9a845c8ac1d614feafb6460d227bf (diff) | |
| download | bcm5719-llvm-8acb4280c52691aa67d3d98bbfc98e7a6710f369.tar.gz bcm5719-llvm-8acb4280c52691aa67d3d98bbfc98e7a6710f369.zip | |
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
Diffstat (limited to 'clang/lib/Sema/SemaExprCXX.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaExprCXX.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index 425297cdb35..eb7924f473a 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -2072,13 +2072,12 @@ void Sema::DeclareGlobalAllocationFunction(DeclarationName Name, if (!getLangOpts().CPlusPlus11) { BadAllocType = Context.getTypeDeclType(getStdBadAlloc()); assert(StdBadAlloc && "Must have std::bad_alloc declared"); - EPI.ExceptionSpecType = EST_Dynamic; - EPI.NumExceptions = 1; - EPI.Exceptions = &BadAllocType; + EPI.ExceptionSpec.Type = EST_Dynamic; + EPI.ExceptionSpec.Exceptions = llvm::makeArrayRef(BadAllocType); } } else { - EPI.ExceptionSpecType = getLangOpts().CPlusPlus11 ? - EST_BasicNoexcept : EST_DynamicNone; + EPI.ExceptionSpec = + getLangOpts().CPlusPlus11 ? EST_BasicNoexcept : EST_DynamicNone; } QualType Params[] = { Param1, Param2 }; |

