[clang] [C2y] Support WG14 N3457, the __COUNTER__ macro (PR #162662)

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 9 08:21:46 PDT 2025


================
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -verify=ext -std=c23 -pedantic %s
+// RUN: %clang_cc1 -verify=pre -std=c2y -pedantic -Wpre-c2y-compat %s
+
+/* WG14 N3457: Clang 22
+ * The __COUNTER__ predefined macro
+ *
+ * This predefined macro was supported as an extension in earlier versions of
+ * Clang, but the required diagnostics for the limits were not added until 22.
----------------
Fznamznon wrote:

Does it make sense to add a C++ test for pedantic warnings?

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


More information about the cfe-commits mailing list