]> granicus.if.org Git - clang/commit
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)
commitbb387fbfa8e49a94e94ab5348ff729ec941e8f32
tree71309a1eaa604874160644b50f63610e858b0c93
parente083843a3ed6314cd84544bec2e5b2bce42d522a
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.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224371 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticLexKinds.td
lib/Lex/PPDirectives.cpp
test/Preprocessor/macro-reserved.c
test/Preprocessor/macro-reserved.cpp