[cfe-commits] r42886 - /cfe/trunk/Sema/SemaChecking.cpp
Ted Kremenek
kremenek at apple.com
Thu Oct 11 17:11:27 PDT 2007
Author: kremenek
Date: Thu Oct 11 19:11:27 2007
New Revision: 42886
URL: http://llvm.org/viewvc/llvm-project?rev=42886&view=rev
Log:
Printf argument checking now supports dynamically-passed precision
specifiers.
Modified:
cfe/trunk/Sema/SemaChecking.cpp
Modified: cfe/trunk/Sema/SemaChecking.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaChecking.cpp?rev=42886&r1=42885&r2=42886&view=diff
==============================================================================
--- cfe/trunk/Sema/SemaChecking.cpp (original)
+++ cfe/trunk/Sema/SemaChecking.cpp Thu Oct 11 19:11:27 2007
@@ -282,11 +282,16 @@
// Seen '%'. Now processing a format conversion.
switch (Str[StrIdx]) {
+ // Handle dynamic precision specifier.
+ case '*':
+ if (Str[StrIdx-1] == '.') ++numConversions;
+ break;
+
// Characters which can terminate a format conversion
// (e.g. "%d"). Characters that specify length modifiers or
// other flags are handled by the default case below.
//
- // TODO: additional checks will go into the following cases.
+ // FIXME: additional checks will go into the following cases.
case 'i':
case 'd':
case 'o':
More information about the cfe-commits
mailing list