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 | 1eb342920b33cda278a913435daad6e1dece6396 (patch) | |
tree | 83a69f2afc9801984af74d5159d0f7502b18c4af /clang/lib/Analysis/PrintfFormatString.cpp | |
parent | 0015f0987792014c9f9daf595c8f4594cb465213 (diff) | |
download | bcm5719-llvm-1eb342920b33cda278a913435daad6e1dece6396.tar.gz bcm5719-llvm-1eb342920b33cda278a913435daad6e1dece6396.zip |
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.
llvm-svn: 172762
Diffstat (limited to 'clang/lib/Analysis/PrintfFormatString.cpp')
-rw-r--r-- | clang/lib/Analysis/PrintfFormatString.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Analysis/PrintfFormatString.cpp b/clang/lib/Analysis/PrintfFormatString.cpp index 5d37de362a4..8f151b9358e 100644 --- a/clang/lib/Analysis/PrintfFormatString.cpp +++ b/clang/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: |