From: Rafael Espindola Date: Mon, 28 Sep 2009 21:24:34 +0000 (+0000) Subject: Add -Wbuiltin-macro-redefined/-Wno-builtin-macro-redefined. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4eda2143f1543faa0399e69bad95756f08fbf0ff;p=clang Add -Wbuiltin-macro-redefined/-Wno-builtin-macro-redefined. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83017 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td index 63afc63285..c34bdc111c 100644 --- a/include/clang/Basic/DiagnosticGroups.td +++ b/include/clang/Basic/DiagnosticGroups.td @@ -70,6 +70,9 @@ def : DiagGroup<"shadow">; def : DiagGroup<"shorten-64-to-32">; def : DiagGroup<"sign-compare">; +// Preprocessor warnings. +def : DiagGroup<"builtin-macro-redefined">; + // Just silence warnings about common forms of -Wstrict-aliasing for now. def : DiagGroup<"strict-aliasing=0">; def : DiagGroup<"strict-aliasing=1">; diff --git a/include/clang/Basic/DiagnosticLexKinds.td b/include/clang/Basic/DiagnosticLexKinds.td index 9eda7bd2f3..3f132c0dab 100644 --- a/include/clang/Basic/DiagnosticLexKinds.td +++ b/include/clang/Basic/DiagnosticLexKinds.td @@ -112,7 +112,8 @@ def pp_poisoning_existing_macro : Warning<"poisoning existing macro">; def pp_out_of_date_dependency : Warning< "current file is older than dependency %0">; def pp_undef_builtin_macro : Warning<"undefining builtin macro">; -def pp_redef_builtin_macro : Warning<"redefining builtin macro">; +def pp_redef_builtin_macro : Warning<"redefining builtin macro">, + InGroup>; def pp_macro_not_used : Warning<"macro is not used">, DefaultIgnore, InGroup>; def warn_pp_undef_identifier : Warning<