aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/PrintfFormatString.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-01-28 00:55:28 +0000
committerTed Kremenek <kremenek@apple.com>2010-01-28 00:55:28 +0000
commitc7cbb9bf8e0bf8c3191ef0b782ec198c433d2a4e (patch)
tree67482d24f5d22160dc9bafa2538bdded3bd98184 /lib/Analysis/PrintfFormatString.cpp
parent0ac8f31af4a8f669700ab8fcad4ae1afc3517373 (diff)
Add '@' conversion specifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94713 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/PrintfFormatString.cpp')
-rw-r--r--lib/Analysis/PrintfFormatString.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Analysis/PrintfFormatString.cpp b/lib/Analysis/PrintfFormatString.cpp
index d7b9a21a3d..9907dc9d42 100644
--- a/lib/Analysis/PrintfFormatString.cpp
+++ b/lib/Analysis/PrintfFormatString.cpp
@@ -193,9 +193,8 @@ static FormatSpecifierResult ParseFormatSpecifier(printf::FormatStringHandler &H
switch (*I) {
default:
H.HandleInvalidConversionSpecifier(I);
- return true;
-
- // Handle the cases we know about.
+ return true;
+ // C99: 7.19.6.1 (section 8).
case 'd': cs = ConversionSpecifier::dArg; break;
case 'i': cs = ConversionSpecifier::iArg; break;
case 'o': cs = ConversionSpecifier::oArg; break;
@@ -214,7 +213,9 @@ static FormatSpecifierResult ParseFormatSpecifier(printf::FormatStringHandler &H
case 's': cs = ConversionSpecifier::CStrArg; break;
case 'p': cs = ConversionSpecifier::VoidPtrArg; break;
case 'n': cs = ConversionSpecifier::OutIntPtrArg; break;
- case '%': cs = ConversionSpecifier::PercentArg; break;
+ case '%': cs = ConversionSpecifier::PercentArg; break;
+ // Objective-C.
+ case '@': cs = ConversionSpecifier::ObjCObjArg; break;
}
FS.setConversionSpecifier(cs);
return FormatSpecifierResult(Start, FS);