================
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wduplicate-decl-specifier %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wc++-compat %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-duplicate-decl-specifier 
-Wc++-compat %s
+// RUN: %clang_cc1 -fsyntax-only -verify=good -Wc++-compat 
-Wno-duplicate-decl-specifier %s
+// RUN: %clang_cc1 -fsyntax-only -verify=good -Wno-duplicate-decl-specifier %s
+// RUN: %clang_cc1 -fsyntax-only -verify -x c++ %s
+// good-no-diagnostics
+
+// Note: we treat this as a warning in C++, so you get the same diagnostics in
+// either language mode. However, GCC diagnoses this as an error, so the
+// compatibility warning has value.
+const const int i = 12; // expected-warning {{duplicate 'const' declaration 
specifier}}
----------------
AaronBallman wrote:

Sure! I added that in f33dc8e4388cb1cc6a9212bc0618542c80b5c1ee

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

Reply via email to