diff options
author | Nico Weber <nicolasweber@gmx.de> | 2014-12-16 21:16:10 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2014-12-16 21:16:10 +0000 |
commit | bb387fbfa8e49a94e94ab5348ff729ec941e8f32 (patch) | |
tree | 71309a1eaa604874160644b50f63610e858b0c93 /include/clang/Basic | |
parent | e083843a3ed6314cd84544bec2e5b2bce42d522a (diff) |
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
Diffstat (limited to 'include/clang/Basic')
-rw-r--r-- | include/clang/Basic/DiagnosticGroups.td | 1 | ||||
-rw-r--r-- | include/clang/Basic/DiagnosticLexKinds.td | 8 |
2 files changed, 2 insertions, 7 deletions
diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td index 34609b2681..65ff0443c3 100644 --- a/include/clang/Basic/DiagnosticGroups.td +++ b/include/clang/Basic/DiagnosticGroups.td @@ -338,7 +338,6 @@ def : DiagGroup<"sequence-point", [Unsequenced]>; // Preprocessor warnings. def AmbiguousMacro : DiagGroup<"ambiguous-macro">; def KeywordAsMacro : DiagGroup<"keyword-macro">; -def ReservedIdAsMacro : DiagGroup<"reserved-id-macro">; // Just silence warnings about -Wstrict-aliasing for now. def : DiagGroup<"strict-aliasing=0">; diff --git a/include/clang/Basic/DiagnosticLexKinds.td b/include/clang/Basic/DiagnosticLexKinds.td index 325ab0e433..65f9f77af4 100644 --- a/include/clang/Basic/DiagnosticLexKinds.td +++ b/include/clang/Basic/DiagnosticLexKinds.td @@ -290,12 +290,8 @@ def note_pp_ambiguous_macro_chosen : Note< "expanding this definition of %0">; def note_pp_ambiguous_macro_other : Note< "other definition of %0">; -def warn_pp_macro_hides_keyword : Warning< - "keyword is hidden by macro definition">, - InGroup<KeywordAsMacro>; -def warn_pp_macro_is_reserved_id : Warning< - "macro name is a reserved identifier">, DefaultIgnore, - InGroup<ReservedIdAsMacro>; +def warn_pp_macro_hides_keyword : Extension< + "keyword is hidden by macro definition">, InGroup<KeywordAsMacro>; def pp_invalid_string_literal : Warning< "invalid string literal, ignoring final '\\'">; |