Format string analysis: give 'q' its own enumerator.
This is in preparation for being able to warn about 'q' and other
non-standard format string features.
It also allows us to print its name correctly.
llvm-svn: 150697
diff --git a/clang/test/Sema/format-strings.c b/clang/test/Sema/format-strings.c
index a7b40f8..e6ce6e3 100644
--- a/clang/test/Sema/format-strings.c
+++ b/clang/test/Sema/format-strings.c
@@ -167,7 +167,9 @@
printf("%.d", x); // no-warning
printf("%.", x); // expected-warning{{incomplete format specifier}}
printf("%f", 4); // expected-warning{{format specifies type 'double' but the argument has type 'int'}}
- printf("%qd", lli);
+ printf("%qd", lli); // no-warning
+ printf("%qd", x); // expected-warning{{format specifies type 'long long' but the argument has type 'int'}}
+ printf("%qp", (void *)0); // expected-warning{{length modifier 'q' results in undefined behavior or no effect with 'p' conversion specifier}}
printf("hhX %hhX", (unsigned char)10); // no-warning
printf("llX %llX", (long long) 10); // no-warning
// This is fine, because there is an implicit conversion to an int.