// Format settings.
def FormatSecurity : DiagGroup<"format-security">;
+def FormatY2K : DiagGroup<"format-y2k">;
def Format : DiagGroup<"format",
[FormatExtraArgs, FormatZeroLength, NonNull,
- FormatSecurity]>,
+ FormatSecurity, FormatY2K]>,
DiagCategory<"Format String Issue">;
def FormatNonLiteral : DiagGroup<"format-nonliteral", [FormatSecurity]>;
-def FormatY2K : DiagGroup<"format-y2k", [Format]>;
def Format2 : DiagGroup<"format=2",
[FormatNonLiteral, FormatSecurity, FormatY2K]>;
--- /dev/null
+// RUN: %clang_cc1 -verify -fsyntax-only -Wformat -Wno-format-y2k
+// rdar://9504680
+
+void foo(const char *, ...) __attribute__((__format__ (__printf__, 1, 2)));
+
+void bar(unsigned int a) {
+ foo("%s", a); // expected-warning {{conversion specifies type 'char *' but the argument has type 'unsigned int'}}
+}
+