forked from OSchip/llvm-project
The 'X' printf type has a valid alternative form. Fixes PR8641.
llvm-svn: 119946
This commit is contained in:
parent
7fb785d449
commit
a369f8dc3a
|
@ -501,10 +501,11 @@ bool PrintfSpecifier::hasValidAlternativeForm() const {
|
|||
if (!HasAlternativeForm)
|
||||
return true;
|
||||
|
||||
// Alternate form flag only valid with the oxaAeEfFgG conversions
|
||||
// Alternate form flag only valid with the oxXaAeEfFgG conversions
|
||||
switch (CS.getKind()) {
|
||||
case ConversionSpecifier::oArg:
|
||||
case ConversionSpecifier::xArg:
|
||||
case ConversionSpecifier::XArg:
|
||||
case ConversionSpecifier::aArg:
|
||||
case ConversionSpecifier::AArg:
|
||||
case ConversionSpecifier::eArg:
|
||||
|
|
|
@ -325,3 +325,8 @@ void rdar8332221(va_list ap, int *x, long *y) {
|
|||
rdar8332221_vprintf_scanf("%", ap, "%d", x); // expected-warning{{incomplete format specifier}}
|
||||
}
|
||||
|
||||
// PR8641
|
||||
void pr8641() {
|
||||
printf("%#x\n", 10);
|
||||
printf("%#X\n", 10);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue