GArg, // 'G',
aArg, // 'a',
AArg, // 'A',
- sArg, // 's'
- pArg, // 'p'
- OutIntPtrArg, // 'n'
+ sArg, // 's'
+ pArg, // 'p'
+ nArg, // 'n'
PercentArg, // '%'
// MacOS X unicode extensions.
CArg, // 'C'
sArg, // 's', // match sequence of non-write-space characters
pArg, // 'p'
cArg, // 'c', differs from printf, writes array of characters
- ConsumedSoFarArg, // 'n', differs from printf, writes back args consumed
+ nArg, // 'n', differs from printf, writes back args consumed
PercentArg, // '%'
ScanListArg, // '[' followed by scan list
// IEEE Std 1003.1 extensions.
case 'f': k = ConversionSpecifier::fArg; break;
case 'g': k = ConversionSpecifier::gArg; break;
case 'i': k = ConversionSpecifier::iArg; break;
- case 'n': k = ConversionSpecifier::OutIntPtrArg; break;
+ case 'n': k = ConversionSpecifier::nArg; break;
case 'o': k = ConversionSpecifier::oArg; break;
case 'p': k = ConversionSpecifier::pArg; break;
case 's': k = ConversionSpecifier::sArg; break;
case cArg: return "c";
case sArg: return "s";
case pArg: return "p";
- case OutIntPtrArg: return "n";
+ case nArg: return "n";
case PercentArg: return "%";
case InvalidSpecifier: return NULL;
// The left justified flag is valid for all conversions except n
switch (CS.getKind()) {
- case ConversionSpecifier::OutIntPtrArg:
+ case ConversionSpecifier::nArg:
return false;
default:
case ConversionSpecifier::uArg:
case ConversionSpecifier::xArg:
case ConversionSpecifier::XArg:
- case ConversionSpecifier::OutIntPtrArg:
+ case ConversionSpecifier::nArg:
return true;
default:
return false;
case ConversionSpecifier::EArg:
case ConversionSpecifier::gArg:
case ConversionSpecifier::GArg:
- case ConversionSpecifier::OutIntPtrArg:
+ case ConversionSpecifier::nArg:
case ConversionSpecifier::cArg:
case ConversionSpecifier::sArg:
return true;
// The field width is valid for all conversions except n
switch (CS.getKind()) {
- case ConversionSpecifier::OutIntPtrArg:
+ case ConversionSpecifier::nArg:
return false;
default:
case 'f': k = ConversionSpecifier::fArg; break;
case 'g': k = ConversionSpecifier::gArg; break;
case 'i': k = ConversionSpecifier::iArg; break;
- case 'n': k = ConversionSpecifier::ConsumedSoFarArg; break;
+ case 'n': k = ConversionSpecifier::nArg; break;
case 'c': k = ConversionSpecifier::cArg; break;
case 'C': k = ConversionSpecifier::CArg; break;
case 'S': k = ConversionSpecifier::SArg; break;
LM.getLength()));
// Are we using '%n'?
- if (CS.getKind() == ConversionSpecifier::OutIntPtrArg) {
+ if (CS.getKind() == ConversionSpecifier::nArg) {
// Issue a warning about this being a possible security issue.
S.Diag(getLocationOfByte(CS.getStart()), diag::warn_printf_write_back)
<< getSpecifierRange(startSpecifier, specifierLen);