r201012 - Fix lifetime issue causing buildbot failures.
Richard Smith
richard-llvm at metafoo.co.uk
Fri Feb 7 16:42:45 PST 2014
Author: rsmith
Date: Fri Feb 7 18:42:45 2014
New Revision: 201012
URL: http://llvm.org/viewvc/llvm-project?rev=201012&view=rev
Log:
Fix lifetime issue causing buildbot failures.
Modified:
cfe/trunk/lib/Sema/SemaExprCXX.cpp
Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=201012&r1=201011&r2=201012&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Fri Feb 7 18:42:45 2014
@@ -2078,14 +2078,14 @@ void Sema::DeclareGlobalAllocationFuncti
FunctionProtoType::ExtProtoInfo EPI;
+ QualType BadAllocType;
bool HasBadAllocExceptionSpec
= (Name.getCXXOverloadedOperator() == OO_New ||
Name.getCXXOverloadedOperator() == OO_Array_New);
if (HasBadAllocExceptionSpec) {
if (!getLangOpts().CPlusPlus11) {
+ BadAllocType = Context.getTypeDeclType(getStdBadAlloc());
assert(StdBadAlloc && "Must have std::bad_alloc declared");
- QualType BadAllocType = Context.getTypeDeclType(getStdBadAlloc());
-
EPI.ExceptionSpecType = EST_Dynamic;
EPI.NumExceptions = 1;
EPI.Exceptions = &BadAllocType;
More information about the cfe-commits
mailing list