Author: Yuxuan Chen Date: 2024-01-21T19:31:40-08:00 New Revision: 71dbefa446e60dcce86fc3f8531e50b1d12ce31f
URL: https://github.com/llvm/llvm-project/commit/71dbefa446e60dcce86fc3f8531e50b1d12ce31f DIFF: https://github.com/llvm/llvm-project/commit/71dbefa446e60dcce86fc3f8531e50b1d12ce31f.diff LOG: [Clang] Drop workaround for old gcc versions (#78803) This workaround existed due to https://gcc.gnu.org/PR56135. The website says that the bug was fixed in GCC 4.8.0 and the latest host toolchain requirement says GCC 7.4. I think it would be very safe to drop this workaround. Added: Modified: clang/lib/Sema/TreeTransform.h Removed: ################################################################################ diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index 2deac7877fcda7..e55e752b9cc354 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -6089,12 +6089,11 @@ QualType TreeTransform<Derived>::TransformFunctionProtoType(TypeLocBuilder &TLB, FunctionProtoTypeLoc TL) { SmallVector<QualType, 4> ExceptionStorage; - TreeTransform *This = this; // Work around gcc.gnu.org/PR56135. return getDerived().TransformFunctionProtoType( TLB, TL, nullptr, Qualifiers(), [&](FunctionProtoType::ExceptionSpecInfo &ESI, bool &Changed) { - return This->getDerived().TransformExceptionSpec( - TL.getBeginLoc(), ESI, ExceptionStorage, Changed); + return getDerived().TransformExceptionSpec(TL.getBeginLoc(), ESI, + ExceptionStorage, Changed); }); } @@ -13645,12 +13644,11 @@ TreeTransform<Derived>::TransformLambdaExpr(LambdaExpr *E) { auto TransformFunctionProtoTypeLoc = [this](TypeLocBuilder &TLB, FunctionProtoTypeLoc FPTL) -> QualType { SmallVector<QualType, 4> ExceptionStorage; - TreeTransform *This = this; // Work around gcc.gnu.org/PR56135. return this->TransformFunctionProtoType( TLB, FPTL, nullptr, Qualifiers(), [&](FunctionProtoType::ExceptionSpecInfo &ESI, bool &Changed) { - return This->TransformExceptionSpec(FPTL.getBeginLoc(), ESI, - ExceptionStorage, Changed); + return TransformExceptionSpec(FPTL.getBeginLoc(), ESI, + ExceptionStorage, Changed); }); }; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits