[PATCH] D27422: Fix stack-use-after-scope in CheckExplicitlyDefaultedMemberExceptionSpec
rsmith added a comment. Phabricator doesn't let me retroactively approve, but LGTM, thanks! Repository: rL LLVM https://reviews.llvm.org/D27422 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D27422: Fix stack-use-after-scope in CheckExplicitlyDefaultedMemberExceptionSpec
This revision was automatically updated to reflect the committed changes. Closed by commit rL288689: Fix stack-use-after-scope in CheckExplicitlyDefaultedMemberExceptionSpec (authored by vitalybuka). Changed prior to commit: https://reviews.llvm.org/D27422?vs=80299=80300#toc Repository: rL LLVM https://reviews.llvm.org/D27422 Files: cfe/trunk/lib/Sema/SemaDeclCXX.cpp Index: cfe/trunk/lib/Sema/SemaDeclCXX.cpp === --- cfe/trunk/lib/Sema/SemaDeclCXX.cpp +++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp @@ -6299,8 +6299,8 @@ CallingConv CC = Context.getDefaultCallingConvention(/*IsVariadic=*/false, /*IsCXXMethod=*/true); FunctionProtoType::ExtProtoInfo EPI(CC); - EPI.ExceptionSpec = computeImplicitExceptionSpec(*this, MD->getLocation(), MD) - .getExceptionSpec(); + auto IES = computeImplicitExceptionSpec(*this, MD->getLocation(), MD); + EPI.ExceptionSpec = IES.getExceptionSpec(); const FunctionProtoType *ImplicitType = cast( Context.getFunctionType(Context.VoidTy, None, EPI)); Index: cfe/trunk/lib/Sema/SemaDeclCXX.cpp === --- cfe/trunk/lib/Sema/SemaDeclCXX.cpp +++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp @@ -6299,8 +6299,8 @@ CallingConv CC = Context.getDefaultCallingConvention(/*IsVariadic=*/false, /*IsCXXMethod=*/true); FunctionProtoType::ExtProtoInfo EPI(CC); - EPI.ExceptionSpec = computeImplicitExceptionSpec(*this, MD->getLocation(), MD) - .getExceptionSpec(); + auto IES = computeImplicitExceptionSpec(*this, MD->getLocation(), MD); + EPI.ExceptionSpec = IES.getExceptionSpec(); const FunctionProtoType *ImplicitType = cast( Context.getFunctionType(Context.VoidTy, None, EPI)); ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D27422: Fix stack-use-after-scope in CheckExplicitlyDefaultedMemberExceptionSpec
vitalybuka created this revision. vitalybuka added a reviewer: rsmith. vitalybuka added subscribers: cfe-commits, aizatsky. Similar to r288685. getExceptionSpec returned structure with pointers to temporarily object created by computeImplicitExceptionSpec. https://reviews.llvm.org/D27422 Files: lib/Sema/SemaDeclCXX.cpp Index: lib/Sema/SemaDeclCXX.cpp === --- lib/Sema/SemaDeclCXX.cpp +++ lib/Sema/SemaDeclCXX.cpp @@ -6299,8 +6299,8 @@ CallingConv CC = Context.getDefaultCallingConvention(/*IsVariadic=*/false, /*IsCXXMethod=*/true); FunctionProtoType::ExtProtoInfo EPI(CC); - EPI.ExceptionSpec = computeImplicitExceptionSpec(*this, MD->getLocation(), MD) - .getExceptionSpec(); + auto IES = computeImplicitExceptionSpec(*this, MD->getLocation(), MD); + EPI.ExceptionSpec = IES.getExceptionSpec(); const FunctionProtoType *ImplicitType = cast( Context.getFunctionType(Context.VoidTy, None, EPI)); Index: lib/Sema/SemaDeclCXX.cpp === --- lib/Sema/SemaDeclCXX.cpp +++ lib/Sema/SemaDeclCXX.cpp @@ -6299,8 +6299,8 @@ CallingConv CC = Context.getDefaultCallingConvention(/*IsVariadic=*/false, /*IsCXXMethod=*/true); FunctionProtoType::ExtProtoInfo EPI(CC); - EPI.ExceptionSpec = computeImplicitExceptionSpec(*this, MD->getLocation(), MD) - .getExceptionSpec(); + auto IES = computeImplicitExceptionSpec(*this, MD->getLocation(), MD); + EPI.ExceptionSpec = IES.getExceptionSpec(); const FunctionProtoType *ImplicitType = cast( Context.getFunctionType(Context.VoidTy, None, EPI)); ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits