[llvm-branch-commits] [clang] 0638df0 - Revert "[clang] Set FP options in Sema when instantiating CompoundStmt"

Tobias Hieta via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Aug 28 03:14:59 PDT 2023


Author: Tobias Hieta
Date: 2023-08-28T12:13:13+02:00
New Revision: 0638df00951ca454b97f9db546a7f85f32258aa8

URL: https://github.com/llvm/llvm-project/commit/0638df00951ca454b97f9db546a7f85f32258aa8
DIFF: https://github.com/llvm/llvm-project/commit/0638df00951ca454b97f9db546a7f85f32258aa8.diff

LOG: Revert "[clang] Set FP options in Sema when instantiating CompoundStmt"

This reverts commit f1d5ea362577a8a1b5fafe775cf82a449daa3b07.

Added: 
    

Modified: 
    clang/lib/Sema/TreeTransform.h

Removed: 
    clang/test/SemaCXX/template-64605.cpp


################################################################################
diff  --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index 097e81ea7d45a2..10b3587885e39f 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -7478,10 +7478,6 @@ StmtResult
 TreeTransform<Derived>::TransformCompoundStmt(CompoundStmt *S,
                                               bool IsStmtExpr) {
   Sema::CompoundScopeRAII CompoundScope(getSema());
-  Sema::FPFeaturesStateRAII FPSave(getSema());
-  if (S->hasStoredFPFeatures())
-    getSema().resetFPOptions(
-        S->getStoredFPFeatures().applyOverrides(getSema().getLangOpts()));
 
   const Stmt *ExprResult = S->getStmtExprResult();
   bool SubStmtInvalid = false;

diff  --git a/clang/test/SemaCXX/template-64605.cpp b/clang/test/SemaCXX/template-64605.cpp
deleted file mode 100644
index b13acbf2ae566b..00000000000000
--- a/clang/test/SemaCXX/template-64605.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-// RUN: %clang_cc1 -ast-dump -ast-dump-filter=b_64605 %s | FileCheck %s
-
-// https://github.com/llvm/llvm-project/issues/64605
-
-#pragma STDC FENV_ACCESS ON
-template <typename>
-int b_64605() {
-  int x;
-  if ((float)0xFFFFFFFF != (float)0x100000000) {
-    x = 1;
-  }
-  return x;
-}
-int f() { return b_64605<void>(); }
-
-// CHECK:      ImplicitCastExpr {{.*}} 'float' <IntegralToFloating> RoundingMath=1 AllowFEnvAccess=1
-// CHECK-NEXT: IntegerLiteral {{.*}} 4294967295
-
-// CHECK:      FunctionDecl {{.*}} b_64605 'int ()' implicit_instantiation
-// CHECK-NEXT: TemplateArgument type 'void'
-
-// CHECK:      ImplicitCastExpr {{.*}} 'float' <IntegralToFloating> RoundingMath=1 AllowFEnvAccess=1
-// CHECK-NEXT: IntegerLiteral {{.*}} 4294967295


        


More information about the llvm-branch-commits mailing list