[cfe-commits] r108899 - in /cfe/trunk: include/clang/Analysis/Analyses/FormatString.h lib/Analysis/PrintfFormatString.cpp
Ted Kremenek
kremenek at apple.com
Tue Jul 20 13:04:04 PDT 2010
Author: kremenek
Date: Tue Jul 20 15:04:04 2010
New Revision: 108899
URL: http://llvm.org/viewvc/llvm-project?rev=108899&view=rev
Log:
Rename 'VoidPtrArg' to 'pArg' in printf/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=108899&r1=108898&r2=108899&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/Analyses/FormatString.h (original)
+++ cfe/trunk/include/clang/Analysis/Analyses/FormatString.h Tue Jul 20 15:04:04 2010
@@ -274,7 +274,7 @@
aArg, // 'a',
AArg, // 'A',
sArg, // 's'
- VoidPtrArg, // 'p'
+ pArg, // 'p'
OutIntPtrArg, // 'n'
PercentArg, // '%'
// MacOS X unicode extensions.
@@ -463,7 +463,7 @@
aArg, // 'a',
AArg, // 'A',
sArg, // 's', // match sequence of non-write-space characters
- VoidPtrArg, // 'p'
+ pArg, // 'p'
cArg, // 'c', differs from printf, writes array of characters
ConsumedSoFarArg, // 'n', differs from printf, writes back args consumed
PercentArg, // '%'
Modified: cfe/trunk/lib/Analysis/PrintfFormatString.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/PrintfFormatString.cpp?rev=108899&r1=108898&r2=108899&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/PrintfFormatString.cpp (original)
+++ cfe/trunk/lib/Analysis/PrintfFormatString.cpp Tue Jul 20 15:04:04 2010
@@ -180,7 +180,7 @@
case 'i': k = ConversionSpecifier::iArg; break;
case 'n': k = ConversionSpecifier::OutIntPtrArg; break;
case 'o': k = ConversionSpecifier::oArg; break;
- case 'p': k = ConversionSpecifier::VoidPtrArg; break;
+ case 'p': k = ConversionSpecifier::pArg; break;
case 's': k = ConversionSpecifier::sArg; break;
case 'u': k = ConversionSpecifier::uArg; break;
case 'x': k = ConversionSpecifier::xArg; break;
@@ -251,7 +251,7 @@
case AArg: return "A";
case cArg: return "c";
case sArg: return "s";
- case VoidPtrArg: return "p";
+ case pArg: return "p";
case OutIntPtrArg: return "n";
case PercentArg: return "%";
case InvalidSpecifier: return NULL;
@@ -330,7 +330,7 @@
return ArgTypeResult::WCStrTy;
case ConversionSpecifier::CArg:
return Ctx.WCharTy;
- case ConversionSpecifier::VoidPtrArg:
+ case ConversionSpecifier::pArg:
return ArgTypeResult::CPointerTy;
default:
break;
@@ -399,7 +399,7 @@
CS.setKind(ConversionSpecifier::fArg);
}
else if (QT->isPointerType()) {
- CS.setKind(ConversionSpecifier::VoidPtrArg);
+ CS.setKind(ConversionSpecifier::pArg);
Precision.setHowSpecified(OptionalAmount::NotSpecified);
HasAlternativeForm = 0;
HasLeadingZeroes = 0;
More information about the cfe-commits
mailing list