thakis created this revision.
thakis added a reviewer: rnk.
thakis added a comment.

There's just one other use of `-fno-ms-compatibility` in clang-tidy's test 
suite, so I'm not 100% sure this is the way to go. It's better than disabling 
the test completely on Windows :)


In MS compatibility mode, "extern inline void g()" is not a redundant
declaration for "inline void g()", because of redeclForcesDefMSVC()
(see PR19264, r205485).

To fix, just run the test with -fno-ms-compatibility.

Final bit of PR43593.


https://reviews.llvm.org/D68640

Files:
  clang-tools-extra/test/clang-tidy/readability-redundant-declaration.cpp


Index: clang-tools-extra/test/clang-tidy/readability-redundant-declaration.cpp
===================================================================
--- clang-tools-extra/test/clang-tidy/readability-redundant-declaration.cpp
+++ clang-tools-extra/test/clang-tidy/readability-redundant-declaration.cpp
@@ -1,7 +1,7 @@
 // RUN: %check_clang_tidy %s readability-redundant-declaration %t -- \
 // RUN:   -config="{CheckOptions: \
 // RUN:             [{key: readability-redundant-declaration.IgnoreMacros, \
-// RUN:               value: 0}]}"
+// RUN:               value: 0}]}" -- -fno-ms-compatibility
 
 extern int Xyz;
 extern int Xyz; // Xyz


Index: clang-tools-extra/test/clang-tidy/readability-redundant-declaration.cpp
===================================================================
--- clang-tools-extra/test/clang-tidy/readability-redundant-declaration.cpp
+++ clang-tools-extra/test/clang-tidy/readability-redundant-declaration.cpp
@@ -1,7 +1,7 @@
 // RUN: %check_clang_tidy %s readability-redundant-declaration %t -- \
 // RUN:   -config="{CheckOptions: \
 // RUN:             [{key: readability-redundant-declaration.IgnoreMacros, \
-// RUN:               value: 0}]}"
+// RUN:               value: 0}]}" -- -fno-ms-compatibility
 
 extern int Xyz;
 extern int Xyz; // Xyz
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to