[cfe-commits] [PATCH] Produce -Wc++0x-compat warnings if C++98 code uses C++11 keywords

Richard Smith richard at metafoo.co.uk
Tue Oct 11 10:59:55 PDT 2011


The attached patch adds a -Wc++0x-compat warning if a C++11 keyword is used
when compiling in C++98 mode. The warning is provided only for the first usage
of each keyword. It has false negatives if the keyword comes from the body of
a macro, but covers the majority of cases. I'm not very familiar with the
lexer, so a review would be very much appreciated.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cxx11-compat-keywords.diff
Type: text/x-patch
Size: 8655 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111011/8cdb7713/attachment.bin>

More information about the cfe-commits mailing list