Skip to content

Commit 964bf8a

Browse files
committed
Fix stack-use-after-scope in CheckExplicitlyDefaultedMemberExceptionSpec
Summary: Similar to r288685. getExceptionSpec returned structure with pointers to temporarily object created by computeImplicitExceptionSpec. Reviewers: rsmith Subscribers: aizatsky, cfe-commits Differential Revision: https://reviews.llvm.org/D27422 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288689 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent ffdb307 commit 964bf8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Sema/SemaDeclCXX.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -6299,8 +6299,8 @@ void Sema::CheckExplicitlyDefaultedMemberExceptionSpec(
62996299
CallingConv CC = Context.getDefaultCallingConvention(/*IsVariadic=*/false,
63006300
/*IsCXXMethod=*/true);
63016301
FunctionProtoType::ExtProtoInfo EPI(CC);
6302-
EPI.ExceptionSpec = computeImplicitExceptionSpec(*this, MD->getLocation(), MD)
6303-
.getExceptionSpec();
6302+
auto IES = computeImplicitExceptionSpec(*this, MD->getLocation(), MD);
6303+
EPI.ExceptionSpec = IES.getExceptionSpec();
63046304
const FunctionProtoType *ImplicitType = cast<FunctionProtoType>(
63056305
Context.getFunctionType(Context.VoidTy, None, EPI));
63066306

0 commit comments

Comments
 (0)