r288685 - Fix stack-use-after-scope in EvaluateImplicitExceptionSpec
Vitaly Buka via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 5 10:30:23 PST 2016
Author: vitalybuka
Date: Mon Dec 5 12:30:22 2016
New Revision: 288685
URL: http://llvm.org/viewvc/llvm-project?rev=288685&view=rev
Log:
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
Modified:
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=288685&r1=288684&r2=288685&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Mon Dec 5 12:30:22 2016
@@ -6100,7 +6100,8 @@ void Sema::EvaluateImplicitExceptionSpec
return;
// Evaluate the exception specification.
- auto ESI = computeImplicitExceptionSpec(*this, Loc, MD).getExceptionSpec();
+ auto IES = computeImplicitExceptionSpec(*this, Loc, MD);
+ auto ESI = IES.getExceptionSpec();
// Update the type of the special member to use it.
UpdateExceptionSpec(MD, ESI);
More information about the cfe-commits
mailing list