Rename 'CStrArg' to 'sArg' for printf checking to match with the analagous enum for scanf checking.

llvm-svn: 108898
This commit is contained in:
Ted Kremenek 2010-07-20 20:03:58 +00:00
parent ab0fe8a48d
commit 563e3edbc2
2 changed files with 7 additions and 7 deletions

View File

@ -273,7 +273,7 @@ public:
GArg, // 'G', GArg, // 'G',
aArg, // 'a', aArg, // 'a',
AArg, // 'A', AArg, // 'A',
CStrArg, // 's' sArg, // 's'
VoidPtrArg, // 'p' VoidPtrArg, // 'p'
OutIntPtrArg, // 'n' OutIntPtrArg, // 'n'
PercentArg, // '%' PercentArg, // '%'

View File

@ -181,7 +181,7 @@ static PrintfSpecifierResult ParsePrintfSpecifier(FormatStringHandler &H,
case 'n': k = ConversionSpecifier::OutIntPtrArg; break; case 'n': k = ConversionSpecifier::OutIntPtrArg; break;
case 'o': k = ConversionSpecifier::oArg; break; case 'o': k = ConversionSpecifier::oArg; break;
case 'p': k = ConversionSpecifier::VoidPtrArg; break; case 'p': k = ConversionSpecifier::VoidPtrArg; break;
case 's': k = ConversionSpecifier::CStrArg; break; case 's': k = ConversionSpecifier::sArg; break;
case 'u': k = ConversionSpecifier::uArg; break; case 'u': k = ConversionSpecifier::uArg; break;
case 'x': k = ConversionSpecifier::xArg; break; case 'x': k = ConversionSpecifier::xArg; break;
// Mac OS X (unicode) specific // Mac OS X (unicode) specific
@ -250,7 +250,7 @@ const char *ConversionSpecifier::toString() const {
case aArg: return "a"; case aArg: return "a";
case AArg: return "A"; case AArg: return "A";
case cArg: return "c"; case cArg: return "c";
case CStrArg: return "s"; case sArg: return "s";
case VoidPtrArg: return "p"; case VoidPtrArg: return "p";
case OutIntPtrArg: return "n"; case OutIntPtrArg: return "n";
case PercentArg: return "%"; case PercentArg: return "%";
@ -322,7 +322,7 @@ ArgTypeResult PrintfSpecifier::getArgType(ASTContext &Ctx) const {
} }
switch (CS.getKind()) { switch (CS.getKind()) {
case ConversionSpecifier::CStrArg: case ConversionSpecifier::sArg:
return ArgTypeResult(LM.getKind() == LengthModifier::AsWideChar ? return ArgTypeResult(LM.getKind() == LengthModifier::AsWideChar ?
ArgTypeResult::WCStrTy : ArgTypeResult::CStrTy); ArgTypeResult::WCStrTy : ArgTypeResult::CStrTy);
case ConversionSpecifier::UnicodeStrArg: case ConversionSpecifier::UnicodeStrArg:
@ -343,7 +343,7 @@ ArgTypeResult PrintfSpecifier::getArgType(ASTContext &Ctx) const {
bool PrintfSpecifier::fixType(QualType QT) { bool PrintfSpecifier::fixType(QualType QT) {
// Handle strings first (char *, wchar_t *) // Handle strings first (char *, wchar_t *)
if (QT->isPointerType() && (QT->getPointeeType()->isAnyCharacterType())) { if (QT->isPointerType() && (QT->getPointeeType()->isAnyCharacterType())) {
CS.setKind(ConversionSpecifier::CStrArg); CS.setKind(ConversionSpecifier::sArg);
// Disable irrelevant flags // Disable irrelevant flags
HasAlternativeForm = 0; HasAlternativeForm = 0;
@ -602,7 +602,7 @@ bool PrintfSpecifier::hasValidLengthModifier() const {
case ConversionSpecifier::GArg: case ConversionSpecifier::GArg:
case ConversionSpecifier::OutIntPtrArg: case ConversionSpecifier::OutIntPtrArg:
case ConversionSpecifier::cArg: case ConversionSpecifier::cArg:
case ConversionSpecifier::CStrArg: case ConversionSpecifier::sArg:
return true; return true;
default: default:
return false; return false;
@ -646,7 +646,7 @@ bool PrintfSpecifier::hasValidPrecision() const {
case ConversionSpecifier::FArg: case ConversionSpecifier::FArg:
case ConversionSpecifier::gArg: case ConversionSpecifier::gArg:
case ConversionSpecifier::GArg: case ConversionSpecifier::GArg:
case ConversionSpecifier::CStrArg: case ConversionSpecifier::sArg:
return true; return true;
default: default: