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 <y...@meta.com>
Date: Fri, 19 Jan 2024 14:41:45 -0800
Subject: [PATCH 1/3] 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);
           });
     };

>From 0587160ab261fed6936481250c0db9d9517ebd49 Mon Sep 17 00:00:00 2001
From: Yuxuan Chen <yuxuanchen1...@outlook.com>
Date: Sun, 21 Jan 2024 11:02:47 -0800
Subject: [PATCH 2/3] Update clang/lib/Sema/TreeTransform.h

Co-authored-by: cor3ntin <corentinja...@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 ca76f68e7303f05..b3cac0bb3853ffd 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);
       });
 }

>From b3f75a39de069d64f755f8d086d7df58b64333ac Mon Sep 17 00:00:00 2001
From: Yuxuan Chen <yuxuanchen1...@outlook.com>
Date: Sun, 21 Jan 2024 11:02:59 -0800
Subject: [PATCH 3/3] Update clang/lib/Sema/TreeTransform.h

Co-authored-by: cor3ntin <corentinja...@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 b3cac0bb3853ffd..3a9881ce34ed091 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -13639,7 +13639,7 @@ TreeTransform<Derived>::TransformLambdaExpr(LambdaExpr 
*E) {
       return this->TransformFunctionProtoType(
           TLB, FPTL, nullptr, Qualifiers(),
           [&](FunctionProtoType::ExceptionSpecInfo &ESI, bool &Changed) {
-            return this->TransformExceptionSpec(FPTL.getBeginLoc(), ESI,
+            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

Reply via email to