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
This commit is contained in:
Hans Wennborg
2012-02-16 16:34:54 +00:00
parent 96de9933fb
commit 9bc9bcc247
6 changed files with 25 additions and 8 deletions

View File

@@ -117,3 +117,7 @@ void test_longlong(long long *x, unsigned long long *y) {
scanf("%Ls", "hello"); // expected-warning {{length modifier 'L' results in undefined behavior or no effect with 's' conversion specifier}}
}
void test_quad(int *x, long long *llx) {
scanf("%qd", x); // expected-warning{{format specifies type 'long long *' but the argument has type 'int *'}}
scanf("%qd", llx); // no-warning
}