Skip to content

Commit ffdb307

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Sema/SemaDeclCXX.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -6100,7 +6100,8 @@ void Sema::EvaluateImplicitExceptionSpec(SourceLocation Loc, CXXMethodDecl *MD)
61006100
return;
61016101

61026102
// Evaluate the exception specification.
6103-
auto ESI = computeImplicitExceptionSpec(*this, Loc, MD).getExceptionSpec();
6103+
auto IES = computeImplicitExceptionSpec(*this, Loc, MD);
6104+
auto ESI = IES.getExceptionSpec();
61046105

61056106
// Update the type of the special member to use it.
61066107
UpdateExceptionSpec(MD, ESI);

0 commit comments

Comments
 (0)