[clang] [clang] Add deprecation warning for `-Ofast` driver option (PR #98736)

James Y Knight via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 14 08:30:35 PDT 2024


================
@@ -10,6 +10,7 @@
 // RUN: %clang -Ofast -fno-strict-aliasing -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST-NO-STRICT-ALIASING %s
 // RUN: %clang -Ofast -fno-vectorize -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST-NO-VECTORIZE %s
 
+// CHECK-OFAST: warning: argument '-Ofast' is deprecated; use '-O3', possibly with '-ffast-math'
----------------
jyknight wrote:

We have `RUN: %clang -Ofast -O2` in this file, which does validate that `-O2` overrides `-Ofast`. However, it should have a CHECK-NOT to ensure it also doesn't emit a diagnostic.

https://github.com/llvm/llvm-project/pull/98736


More information about the cfe-commits mailing list