[cfe-commits] r108898 - in /cfe/trunk: include/clang/Analysis/Analyses/FormatString.h lib/Analysis/PrintfFormatString.cpp
Ted Kremenek
kremenek at apple.com
Tue Jul 20 13:03:58 PDT 2010
Author: kremenek
Date: Tue Jul 20 15:03:58 2010
New Revision: 108898
URL: http://llvm.org/viewvc/llvm-project?rev=108898&view=rev
Log:
Rename 'CStrArg' to 'sArg' for printf checking to match with the analagous enum for scanf checking.
Modified:
cfe/trunk/include/clang/Analysis/Analyses/FormatString.h
cfe/trunk/lib/Analysis/PrintfFormatString.cpp
Modified: cfe/trunk/include/clang/Analysis/Analyses/FormatString.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/Analyses/FormatString.h?rev=108898&r1=108897&r2=108898&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/Analyses/FormatString.h (original)
+++ cfe/trunk/include/clang/Analysis/Analyses/FormatString.h Tue Jul 20 15:03:58 2010
@@ -273,7 +273,7 @@
GArg, // 'G',
aArg, // 'a',
AArg, // 'A',
- CStrArg, // 's'
+ sArg, // 's'
VoidPtrArg, // 'p'
OutIntPtrArg, // 'n'
PercentArg, // '%'
Modified: cfe/trunk/lib/Analysis/PrintfFormatString.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/PrintfFormatString.cpp?rev=108898&r1=108897&r2=108898&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/PrintfFormatString.cpp (original)
+++ cfe/trunk/lib/Analysis/PrintfFormatString.cpp Tue Jul 20 15:03:58 2010
@@ -181,7 +181,7 @@
case 'n': k = ConversionSpecifier::OutIntPtrArg; break;
case 'o': k = ConversionSpecifier::oArg; 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 'x': k = ConversionSpecifier::xArg; break;
// Mac OS X (unicode) specific
@@ -250,7 +250,7 @@
case aArg: return "a";
case AArg: return "A";
case cArg: return "c";
- case CStrArg: return "s";
+ case sArg: return "s";
case VoidPtrArg: return "p";
case OutIntPtrArg: return "n";
case PercentArg: return "%";
@@ -322,7 +322,7 @@
}
switch (CS.getKind()) {
- case ConversionSpecifier::CStrArg:
+ case ConversionSpecifier::sArg:
return ArgTypeResult(LM.getKind() == LengthModifier::AsWideChar ?
ArgTypeResult::WCStrTy : ArgTypeResult::CStrTy);
case ConversionSpecifier::UnicodeStrArg:
@@ -343,7 +343,7 @@
bool PrintfSpecifier::fixType(QualType QT) {
// Handle strings first (char *, wchar_t *)
if (QT->isPointerType() && (QT->getPointeeType()->isAnyCharacterType())) {
- CS.setKind(ConversionSpecifier::CStrArg);
+ CS.setKind(ConversionSpecifier::sArg);
// Disable irrelevant flags
HasAlternativeForm = 0;
@@ -602,7 +602,7 @@
case ConversionSpecifier::GArg:
case ConversionSpecifier::OutIntPtrArg:
case ConversionSpecifier::cArg:
- case ConversionSpecifier::CStrArg:
+ case ConversionSpecifier::sArg:
return true;
default:
return false;
@@ -646,7 +646,7 @@
case ConversionSpecifier::FArg:
case ConversionSpecifier::gArg:
case ConversionSpecifier::GArg:
- case ConversionSpecifier::CStrArg:
+ case ConversionSpecifier::sArg:
return true;
default:
More information about the cfe-commits
mailing list