https://github.com/yuxuanchen1997 created https://github.com/llvm/llvm-project/pull/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. >From f70671fe2c887941e330b1c7a7a2b52ad7926513 Mon Sep 17 00:00:00 2001 From: Yuxuan Chen <y...@meta.com> Date: Fri, 19 Jan 2024 14:41:45 -0800 Subject: [PATCH] Drop workaround for old gcc versions --- clang/lib/Sema/TreeTransform.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index 4463904b07211bd..ca76f68e7303f05 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -6081,11 +6081,10 @@ 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( + return this->getDerived().TransformExceptionSpec( TL.getBeginLoc(), ESI, ExceptionStorage, Changed); }); } @@ -13637,11 +13636,10 @@ 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, + return this->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