Skip to content

Commit

Permalink
[Clang] Drop workaround for old gcc versions (#78803)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
yuxuanchen1997 committed Jan 22, 2024
1 parent 04c8558 commit 71dbefa
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions clang/lib/Sema/TreeTransform.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
}

Expand Down Expand Up @@ -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);
});
};

Expand Down

0 comments on commit 71dbefa

Please sign in to comment.