Recognize 'q' as a format length modifier (from BSD).
llvm-svn: 94894
This commit is contained in:
parent
842bf17366
commit
19b70bd46c
|
@ -105,7 +105,7 @@ enum LengthModifier {
|
|||
AsChar, // 'hh'
|
||||
AsShort, // 'h'
|
||||
AsLong, // 'l'
|
||||
AsLongLong, // 'll'
|
||||
AsLongLong, // 'll', 'q' (BSD, deprecated)
|
||||
AsIntMax, // 'j'
|
||||
AsSizeT, // 'z'
|
||||
AsPtrDiff, // 't'
|
||||
|
|
|
@ -185,6 +185,7 @@ static FormatSpecifierResult ParseFormatSpecifier(FormatStringHandler &H,
|
|||
case 'z': lm = AsSizeT; ++I; break;
|
||||
case 't': lm = AsPtrDiff; ++I; break;
|
||||
case 'L': lm = AsLongDouble; ++I; break;
|
||||
case 'q': lm = AsLongLong; ++I; break;
|
||||
}
|
||||
FS.setLengthModifier(lm);
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ void torture(va_list v8) {
|
|||
|
||||
}
|
||||
|
||||
void test10(int x, float f, int i) {
|
||||
void test10(int x, float f, int i, long long lli) {
|
||||
printf("%@", 12); // expected-warning{{invalid conversion specifier '@'}}
|
||||
printf("\0"); // expected-warning{{format string contains '\0' within the string body}}
|
||||
printf("xs\0"); // expected-warning{{format string contains '\0' within the string body}}
|
||||
|
@ -161,6 +161,7 @@ void test10(int x, float f, int i) {
|
|||
printf("%.d", x); // no-warning
|
||||
printf("%.", x); // expected-warning{{incomplete format specifier}}
|
||||
printf("%f", 4); // expected-warning{{conversion specifies type 'double' but the argument has type 'int'}}
|
||||
printf("%qd", lli);
|
||||
}
|
||||
|
||||
typedef struct __aslclient *aslclient;
|
||||
|
|
Loading…
Reference in New Issue