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

Reading this again, it seems it’s because of the relative `@`. I’d suggest 
using markers instead, or if possible, putting the comments on the same line as 
the diagnostic to avoid problems like these—I know this is how it’s done in the 
rest of the file too, but we tend to prefer not to use relative offsets in 
cases like these.

https://github.com/llvm/llvm-project/pull/84014
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to