diff options
Diffstat (limited to 'lib/Analysis/PrintfFormatString.cpp')
-rw-r--r-- | lib/Analysis/PrintfFormatString.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Analysis/PrintfFormatString.cpp b/lib/Analysis/PrintfFormatString.cpp index 986411fc7d..1a95e0b882 100644 --- a/lib/Analysis/PrintfFormatString.cpp +++ b/lib/Analysis/PrintfFormatString.cpp @@ -15,7 +15,7 @@ #include "clang/Analysis/Analyses/PrintfFormatString.h" using namespace clang; -using namespace analyze_printf; +using namespace clang::analyze_printf; namespace { class FormatSpecifierResult { @@ -70,10 +70,12 @@ static OptionalAmount ParseAmount(const char *&Beg, const char *E) { } if (foundDigits) - return OptionalAmount(accumulator); + return OptionalAmount(accumulator, Beg); - if (c == '*') - return OptionalAmount(OptionalAmount::Arg); + if (c == '*') { + ++I; + return OptionalAmount(OptionalAmount::Arg, Beg); + } break; } |