[cfe-commits] r108897 - in /cfe/trunk: include/clang/Analysis/Analyses/FormatString.h lib/Analysis/PrintfFormatString.cpp
Ted Kremenek
kremenek at apple.com
Tue Jul 20 13:03:49 PDT 2010
Author: kremenek
Date: Tue Jul 20 15:03:49 2010
New Revision: 108897
URL: http://llvm.org/viewvc/llvm-project?rev=108897&view=rev
Log:
Rename analyze_printf::ConversionSpecifier::IntAsCharArg to 'cArg' to match
analagous enum in analyze_scanf. This is prep for refactoring the logic for handling
ConversionSpecifiers for both scanf and printf.
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=108897&r1=108896&r2=108897&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/Analyses/FormatString.h (original)
+++ cfe/trunk/include/clang/Analysis/Analyses/FormatString.h Tue Jul 20 15:03:49 2010
@@ -259,7 +259,7 @@
InvalidSpecifier = 0,
// C99 conversion specifiers.
dArg, // 'd'
- IntAsCharArg, // 'c'
+ cArg, // 'c'
iArg, // 'i',
oArg, // 'o',
uArg, // 'u',
Modified: cfe/trunk/lib/Analysis/PrintfFormatString.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/PrintfFormatString.cpp?rev=108897&r1=108896&r2=108897&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/PrintfFormatString.cpp (original)
+++ cfe/trunk/lib/Analysis/PrintfFormatString.cpp Tue Jul 20 15:03:49 2010
@@ -172,7 +172,7 @@
case 'G': k = ConversionSpecifier::GArg; break;
case 'X': k = ConversionSpecifier::XArg; break;
case 'a': k = ConversionSpecifier::aArg; break;
- case 'c': k = ConversionSpecifier::IntAsCharArg; break;
+ case 'c': k = ConversionSpecifier::cArg; break;
case 'd': k = ConversionSpecifier::dArg; break;
case 'e': k = ConversionSpecifier::eArg; break;
case 'f': k = ConversionSpecifier::fArg; break;
@@ -249,7 +249,7 @@
case GArg: return "G";
case aArg: return "a";
case AArg: return "A";
- case IntAsCharArg: return "c";
+ case cArg: return "c";
case CStrArg: return "s";
case VoidPtrArg: return "p";
case OutIntPtrArg: return "n";
@@ -388,7 +388,7 @@
// Set conversion specifier and disable any flags which do not apply to it.
if (QT->isAnyCharacterType()) {
- CS.setKind(ConversionSpecifier::IntAsCharArg);
+ CS.setKind(ConversionSpecifier::cArg);
Precision.setHowSpecified(OptionalAmount::NotSpecified);
HasAlternativeForm = 0;
HasLeadingZeroes = 0;
@@ -601,7 +601,7 @@
case ConversionSpecifier::gArg:
case ConversionSpecifier::GArg:
case ConversionSpecifier::OutIntPtrArg:
- case ConversionSpecifier::IntAsCharArg:
+ case ConversionSpecifier::cArg:
case ConversionSpecifier::CStrArg:
return true;
default:
More information about the cfe-commits
mailing list