From 2bb7c54621f31a957302a4deb3d25b752acb07bd Mon Sep 17 00:00:00 2001 From: Serge Pavlov Date: Mon, 1 Aug 2022 14:52:40 +0700 Subject: [PATCH] [Clang] Remove unused parameter. NFC BinaryOperator::getFPFeatures get parameter, which is not used. Similar methods of other AST nodes do not have any parameter. --- clang/include/clang/AST/Expr.h | 2 +- clang/lib/AST/ASTImporter.cpp | 4 ++-- clang/lib/Sema/SemaExprCXX.cpp | 2 +- clang/lib/Sema/TreeTransform.h | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/clang/include/clang/AST/Expr.h b/clang/include/clang/AST/Expr.h index 1f3d524..1fc6dc9 100644 --- a/clang/include/clang/AST/Expr.h +++ b/clang/include/clang/AST/Expr.h @@ -4009,7 +4009,7 @@ public: } // This is used in ASTImporter - FPOptionsOverride getFPFeatures(const LangOptions &LO) const { + FPOptionsOverride getFPFeatures() const { if (BinaryOperatorBits.HasFPFeatures) return getStoredFPFeatures(); return FPOptionsOverride(); diff --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp index 0273e50..1590107 100644 --- a/clang/lib/AST/ASTImporter.cpp +++ b/clang/lib/AST/ASTImporter.cpp @@ -7224,7 +7224,7 @@ ExpectedStmt ASTNodeImporter::VisitBinaryOperator(BinaryOperator *E) { return BinaryOperator::Create( Importer.getToContext(), ToLHS, ToRHS, E->getOpcode(), ToType, E->getValueKind(), E->getObjectKind(), ToOperatorLoc, - E->getFPFeatures(Importer.getFromContext().getLangOpts())); + E->getFPFeatures()); } ExpectedStmt ASTNodeImporter::VisitConditionalOperator(ConditionalOperator *E) { @@ -7335,7 +7335,7 @@ ASTNodeImporter::VisitCompoundAssignOperator(CompoundAssignOperator *E) { return CompoundAssignOperator::Create( Importer.getToContext(), ToLHS, ToRHS, E->getOpcode(), ToType, E->getValueKind(), E->getObjectKind(), ToOperatorLoc, - E->getFPFeatures(Importer.getFromContext().getLangOpts()), + E->getFPFeatures(), ToComputationLHSType, ToComputationResultType); } diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index ee3f9c6..30c1f5c 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -7381,7 +7381,7 @@ ExprResult Sema::ActOnDecltypeExpression(Expr *E) { return BinaryOperator::Create(Context, BO->getLHS(), RHS.get(), BO_Comma, BO->getType(), BO->getValueKind(), BO->getObjectKind(), BO->getOperatorLoc(), - BO->getFPFeatures(getLangOpts())); + BO->getFPFeatures()); } } diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index c52e12d..86d9215 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -11186,7 +11186,7 @@ TreeTransform::TransformBinaryOperator(BinaryOperator *E) { return getDerived().RebuildBinaryOperator( E->getOperatorLoc(), E->getOpcode(), LHS.get(), RHS.get()); Sema::FPFeaturesStateRAII FPFeaturesState(getSema()); - FPOptionsOverride NewOverrides(E->getFPFeatures(getSema().getLangOpts())); + FPOptionsOverride NewOverrides(E->getFPFeatures()); getSema().CurFPFeatures = NewOverrides.applyOverrides(getSema().getLangOpts()); getSema().FpPragmaStack.CurrentValue = NewOverrides; @@ -11253,7 +11253,7 @@ ExprResult TreeTransform::TransformCompoundAssignOperator( CompoundAssignOperator *E) { Sema::FPFeaturesStateRAII FPFeaturesState(getSema()); - FPOptionsOverride NewOverrides(E->getFPFeatures(getSema().getLangOpts())); + FPOptionsOverride NewOverrides(E->getFPFeatures()); getSema().CurFPFeatures = NewOverrides.applyOverrides(getSema().getLangOpts()); getSema().FpPragmaStack.CurrentValue = NewOverrides; -- 2.7.4