[clang] [clang] Store FPOptions earlier when parsing function (PR #92146)

Serge Pavlov via cfe-commits cfe-commits at lists.llvm.org
Tue May 14 22:25:47 PDT 2024


================
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -emit-pch -DHEADER -x c++-header %s -o %t.pch
+// RUN: %clang_cc1 -emit-llvm -include-pch %t.pch %s -o /dev/null
+
+#ifdef HEADER
+__attribute__((optnone)) void foo() {}
+#endif
----------------
spavloff wrote:

It is to avoid redefinition error. Funny, just this error was observed, because the macro also got into the precompiled header.

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


More information about the cfe-commits mailing list