[PATCH] D93095: Introduce -Wreserved-identifier

Arthur O'Dwyer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 8 07:05:17 PST 2021


Quuxplusone added inline comments.


================
Comment at: clang/test/Sema/reserved-identifier.cpp:77
+
+long double operator"" _BarbeBleue(long double) // no-warning
+{
----------------
This should get a warning, since it's using an identifier "reserved for any use."
https://stackoverflow.com/questions/228783/what-are-the-rules-about-using-an-underscore-in-a-c-identifier
http://eel.is/c++draft/lex.name#3.1
If the implementation predefines `#define _BarbeBleue 42` (which the implementation is permitted to do), then this code won't compile.


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

https://reviews.llvm.org/D93095



More information about the cfe-commits mailing list