diff options
author | Serge Pavlov <sepavloff@gmail.com> | 2014-12-11 12:18:08 +0000 |
---|---|---|
committer | Serge Pavlov <sepavloff@gmail.com> | 2014-12-11 12:18:08 +0000 |
commit | b13e6793c22b2fabc614dd46e912fa9c18769645 (patch) | |
tree | 9d1381e96975d280d7333217a9d2cbead0ae0cfa /include/clang/Basic/DiagnosticLexKinds.td | |
parent | 1942cb3102eb8846269a866e59f7e6f7b1114915 (diff) |
Emit warning if define or undef reserved identifier or keyword.
Recommit of r223114, reverted in r223120.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224012 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/DiagnosticLexKinds.td')
-rw-r--r-- | include/clang/Basic/DiagnosticLexKinds.td | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticLexKinds.td b/include/clang/Basic/DiagnosticLexKinds.td index 2fcfa02c39..5eb9e65953 100644 --- a/include/clang/Basic/DiagnosticLexKinds.td +++ b/include/clang/Basic/DiagnosticLexKinds.td @@ -290,6 +290,14 @@ 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 or reserved identifier is hidden by macro definition">, + InGroup<KeywordAsMacro>; +def warn_pp_macro_is_reserved_id : Warning< + "macro name is a keyword or reserved identifier">, InGroup<KeywordAsMacro>; +def warn_pp_defundef_reserved_ident : Warning< + "reserved identifier is used as macro name">, DefaultIgnore, + InGroup<ReservedIdAsMacro>; def pp_invalid_string_literal : Warning< "invalid string literal, ignoring final '\\'">; |