[clang] [clang] Don't warn on __COUNTER__ in system macros (PR #196689)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue May 12 04:35:28 PDT 2026


================
@@ -0,0 +1,7 @@
+#define COUNTER_ALIAS __COUNTER__
+#define COUNTER_MACRO() __COUNTER__
+
+int header_counter_value = __COUNTER__;
+int header_counter_alias = COUNTER_ALIAS;
+int header_counter_macro = COUNTER_MACRO();
----------------
AaronBallman wrote:

Nevermind, after closer inspection that's not related.

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


More information about the cfe-commits mailing list