Move -Wkeyword-macro into -pedantic, remove -Wreserved-id-macro.
authorNico Weber <nicolasweber@gmx.de>
Tue, 16 Dec 2014 21:16:10 +0000 (21:16 +0000)
committerNico Weber <nicolasweber@gmx.de>
Tue, 16 Dec 2014 21:16:10 +0000 (21:16 +0000)
commit92c14bb2ff85d16785140c93493d97060ffcf2e7
treea9e03dba45e77a0dd11e6ae90882ef7238573545
parent5f5bc4abd31eb29c929053bbd30903fb12d69669
Move -Wkeyword-macro into -pedantic, remove -Wreserved-id-macro.

As discussed on the post-commit review thread for r224012, -Wkeyword-macro fires
mostly on headers trying to set up portable defines and doesn't find much bad
stuff in practice.  But [macro.names]p2 does disallow defining or undefining
keywords, override and final, and alignas, so keep the warning but move it
into -pedantic.

-Wreserved-id-macro warns on

    #define __need_size_t

which is more or less public api for glibc headers. Since this warning isn't
motivated by a standard, remove it.

(See also r223114 for a previous follow-up to r224012.)

llvm-svn: 224371
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticLexKinds.td
clang/lib/Lex/PPDirectives.cpp
clang/test/Preprocessor/macro-reserved.c
clang/test/Preprocessor/macro-reserved.cpp