[clang] [Clang] Drop workaround for old gcc versions (PR #78803)
Yuxuan Chen via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 21 18:45:13 PST 2024
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/78803
>From 6841b80f5baf33ebdf4a9203c9079bffac1d589c Mon Sep 17 00:00:00 2001
From: Yuxuan Chen <ych at meta.com>
Date: Fri, 19 Jan 2024 14:41:45 -0800
Subject: [PATCH] Drop workaround for old gcc versions
---
clang/lib/Sema/TreeTransform.h | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index 2deac7877fcda7b..e55e752b9cc354c 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);
});
};
More information about the cfe-commits
mailing list