[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 5 08:03:26 PST 2024


================
@@ -55,9 +55,14 @@ struct A {
     clang_analyzer_dump(__func__);
     clang_analyzer_dump(__FUNCTION__);
     clang_analyzer_dump(__PRETTY_FUNCTION__);
-    // expected-warning at -3 {{&Element{"A",0 S64b,char}}}
-    // expected-warning at -3 {{&Element{"A",0 S64b,char}}}
-    // expected-warning at -3 {{&Element{"A::A()",0 S64b,char}}}
+#ifdef ANALYZER_MS
+    // expected-warning at -4 {{&Element{"A",0 S64b,char}}}
+    // expected-warning at -4 {{&Element{"A::A",0 S64b,char}}}
+#else
+    // expected-warning at -7 {{&Element{"A",0 S64b,char}}}
+    // expected-warning at -7 {{&Element{"A",0 S64b,char}}}
----------------
Sirraide wrote:

The first of these two doesn’t seem to have changed. Is there a good reason why it’s inside the `#ifdef`?

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


More information about the cfe-commits mailing list