aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/PrintfFormatString.cpp
diff options
context:
space:
mode:
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);