summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Analysis')
-rw-r--r--clang/lib/Analysis/PrintfFormatString.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Analysis/PrintfFormatString.cpp b/clang/lib/Analysis/PrintfFormatString.cpp
index 951be17e2f1..8ad1d21312c 100644
--- a/clang/lib/Analysis/PrintfFormatString.cpp
+++ b/clang/lib/Analysis/PrintfFormatString.cpp
@@ -611,20 +611,21 @@ const char *LengthModifier::toString() const {
//===----------------------------------------------------------------------===//
void OptionalAmount::toString(llvm::raw_ostream &os) const {
- if (UsesDotPrefix)
- os << ".";
-
switch (hs) {
case Invalid:
case NotSpecified:
return;
case Arg:
+ if (UsesDotPrefix)
+ os << ".";
if (usesPositionalArg())
os << "*" << getPositionalArgIndex() << "$";
else
os << "*";
break;
case Constant:
+ if (UsesDotPrefix)
+ os << ".";
os << amt;
break;
}
OpenPOWER on IntegriCloud