diff options
Diffstat (limited to 'lib/Analysis/PrintfFormatString.cpp')
-rw-r--r-- | lib/Analysis/PrintfFormatString.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Analysis/PrintfFormatString.cpp b/lib/Analysis/PrintfFormatString.cpp index 951be17e2f..8ad1d21312 100644 --- a/lib/Analysis/PrintfFormatString.cpp +++ b/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; } |