From: Chris Lattner Date: Wed, 29 Apr 2009 04:31:58 +0000 (+0000) Subject: Wire up -Wformat=2 and -Wformat-extra-args X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f6cfd22f6b59590859acda48a7d55bca9578298;p=clang Wire up -Wformat=2 and -Wformat-extra-args git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70364 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td index 69651f41a4..e0d33e2d24 100644 --- a/include/clang/Basic/DiagnosticGroups.td +++ b/include/clang/Basic/DiagnosticGroups.td @@ -35,14 +35,13 @@ def ExtraTokens : DiagGroup<"extra-tokens">; def FormatExtraArgs : DiagGroup<"format-extra-args">; def Format : DiagGroup<"format", [FormatExtraArgs]>; -def Format2 : DiagGroup<"format=2", [Format]>; def FormatNonLiteral : DiagGroup<"format-nonliteral", [Format]>; def FormatSecurity : DiagGroup<"format-security", [Format]>; -def : DiagGroup<"format-y2k", [Format]>; +def FormatY2K : DiagGroup<"format-y2k", [Format]>; +def Format2 : DiagGroup<"format=2", + [FormatNonLiteral, FormatSecurity, FormatY2K]>; def FourByteMultiChar : DiagGroup<"four-char-constants">; - - def : DiagGroup<"init-self">; def : DiagGroup<"inline">; def : DiagGroup<"int-to-pointer-cast">; diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 88607f3a3b..30e9b389a6 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -1509,7 +1509,7 @@ def warn_printf_write_back : Warning< def warn_printf_insufficient_data_args : Warning< "more '%%' conversions than data arguments">; def warn_printf_too_many_data_args : Warning< - "more data arguments than '%%' conversions">; + "more data arguments than '%%' conversions">, InGroup; def warn_printf_invalid_conversion : Warning<"invalid conversion '%0'">; def warn_printf_missing_format_string : Warning<"format string missing">; def warn_printf_empty_format_string : Warning<"format string is empty">;