[PATCH] D144654: [Lex] Warn when defining or undefining any builtin macro

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 15 10:55:46 PDT 2023


aaron.ballman added inline comments.


================
Comment at: clang/test/Preprocessor/macro-reserved.cpp:15
 
-#undef __cplusplus
+#undef __cplusplus // expected-warning {{undefining builtin macro}}
 #define __cplusplus
----------------
Why do we diagnose the undef but not the define?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144654/new/

https://reviews.llvm.org/D144654



More information about the cfe-commits mailing list