aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-29 04:31:58 +0000
committerChris Lattner <sabre@nondot.org>2009-04-29 04:31:58 +0000
commit5f6cfd22f6b59590859acda48a7d55bca9578298 (patch)
treeb38e2da0a554a82bd1428e0c45f833c64858e49b
parent02c2e1fef53183a37cb9128863edbf620688abc3 (diff)
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
-rw-r--r--include/clang/Basic/DiagnosticGroups.td7
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td2
2 files changed, 4 insertions, 5 deletions
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<FormatExtraArgs>;
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">;