[PATCH] D125178: Warn if using `elifdef` & `elifndef` in not C2x & C++2b mode

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 11 09:57:34 PDT 2022


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM aside from a super minor nit in a test file. Can you please add a release note for the new diagnostics as well?

I'm happy to land this for you when you're ready, but let me know which email address you'd like me to use this time around.



================
Comment at: clang/test/Preprocessor/ifdef-recover.c:23-29
+// expected-warning at +2 {{use of a '#elifdef' directive is a C2x extension}}
 #ifdef FOO
 #elifdef
 #endif
 
-/* expected-error at +2 {{macro name must be an identifier}} */
+/* expected-error at +3 {{macro name must be an identifier}} */
+// expected-warning at +2 {{use of a '#elifdef' directive is a C2x extension}}
----------------
Just to keep comment styles the same.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125178



More information about the cfe-commits mailing list