diff options
author | Jordan Rose <jordan_rose@apple.com> | 2013-01-17 22:34:10 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2013-01-17 22:34:10 +0000 |
commit | cdbe1e0d85d7d32452dd1c52758d7bfaa1c0663b (patch) | |
tree | ff971142e79d16f5b8d2fc7b78d5f227e1581373 /lib/Analysis/PrintfFormatString.cpp | |
parent | de03c15ad92b44a4be11507ca2501bb9dd014dce (diff) |
Format strings: don't ever convert %+d to %lu.
Presumably, if the printf format has the sign explicitly requested, the user
wants to treat the data as signed.
This is a fix-up for r172739, and also includes several test changes that
didn't make it into that commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172762 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/PrintfFormatString.cpp')
-rw-r--r-- | lib/Analysis/PrintfFormatString.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/PrintfFormatString.cpp b/lib/Analysis/PrintfFormatString.cpp index 5d37de362a..8f151b9358 100644 --- a/lib/Analysis/PrintfFormatString.cpp +++ b/lib/Analysis/PrintfFormatString.cpp @@ -511,7 +511,7 @@ bool PrintfSpecifier::fixType(QualType QT, const LangOptions &LangOpt, case ConversionSpecifier::dArg: case ConversionSpecifier::DArg: case ConversionSpecifier::iArg: - if (QT->isUnsignedIntegerType()) + if (QT->isUnsignedIntegerType() && !HasPlusPrefix) CS.setKind(clang::analyze_format_string::ConversionSpecifier::uArg); break; default: |