[clang] [Clang] Drop workaround for old gcc versions (PR #78803)
Yuxuan Chen via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 21 11:02:54 PST 2024
https://github.com/yuxuanchen1997 updated https://github.com/llvm/llvm-project/pull/78803
>From f70671fe2c887941e330b1c7a7a2b52ad7926513 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 1/2] 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 4463904b07211b..ca76f68e7303f0 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);
});
};
>From 0587160ab261fed6936481250c0db9d9517ebd49 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen <yuxuanchen1997 at outlook.com>
Date: Sun, 21 Jan 2024 11:02:47 -0800
Subject: [PATCH 2/2] Update clang/lib/Sema/TreeTransform.h
Co-authored-by: cor3ntin <corentinjabot at gmail.com>
---
clang/lib/Sema/TreeTransform.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index ca76f68e7303f0..b3cac0bb3853ff 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -6084,7 +6084,7 @@ TreeTransform<Derived>::TransformFunctionProtoType(TypeLocBuilder &TLB,
return getDerived().TransformFunctionProtoType(
TLB, TL, nullptr, Qualifiers(),
[&](FunctionProtoType::ExceptionSpecInfo &ESI, bool &Changed) {
- return this->getDerived().TransformExceptionSpec(
+ return getDerived().TransformExceptionSpec(
TL.getBeginLoc(), ESI, ExceptionStorage, Changed);
});
}
More information about the cfe-commits
mailing list