[clang] [clang] Add test for CWG3088 about macros defining special identifiers (PR #189309)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Wed May 27 13:59:13 PDT 2026


================
@@ -0,0 +1,618 @@
+// RUN: %clang_cc1 -std=c++98 -fexceptions -fcxx-exceptions -pedantic-errors %s -verify-directives -verify=expected
+// RUN: %clang_cc1 -std=c++11 -fexceptions -fcxx-exceptions -pedantic-errors %s -verify-directives -verify=expected,since-cxx11
+// RUN: %clang_cc1 -std=c++14 -fexceptions -fcxx-exceptions -pedantic-errors %s -verify-directives -verify=expected,since-cxx11
+// RUN: %clang_cc1 -std=c++17 -fexceptions -fcxx-exceptions -pedantic-errors %s -verify-directives -verify=expected,since-cxx11
+// RUN: %clang_cc1 -std=c++20 -fexceptions -fcxx-exceptions -pedantic-errors %s -verify-directives -verify=expected,since-cxx11,since-cxx20
+// RUN: %clang_cc1 -std=c++23 -fexceptions -fcxx-exceptions -pedantic-errors %s -verify-directives -verify=expected,since-cxx11,since-cxx20
+// RUN: %clang_cc1 -std=c++2c -fexceptions -fcxx-exceptions -pedantic-errors %s -verify-directives -verify=expected,since-cxx11,since-cxx20
+
+namespace cwg3088 { // cwg3088: partial
+// Keywords introduced in C++98
+
+#define asm
----------------
Endilll wrote:

Hopefully WG21 won't end up adding keyword to C++98, but if I understand the question correctly, you open [lex.key] of the new Standard and compare it to the [lex.key] of the previous publication — the difference is what you'd need to add.

Attributes are a tiny bit trickier — table of contents of [dcl.attr] works best for them.

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


More information about the cfe-commits mailing list