diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-07-13 17:25:47 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-07-13 17:25:47 +0000 |
commit | 45eb7022ff059ff5a291e24f57ff56428a1e8210 (patch) | |
tree | 22e0569623d9a1240269d9d72fcd2a85e1b863f5 /lib/Analysis/FormatString.cpp | |
parent | fbf780a9d1dbb191fc40c8af967c590e08724b74 (diff) |
Fix inversion in argument type checking for format strings with conversion specifiers for character types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135046 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/FormatString.cpp')
-rw-r--r-- | lib/Analysis/FormatString.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/FormatString.cpp b/lib/Analysis/FormatString.cpp index c1b5ea8a65..9a8639015c 100644 --- a/lib/Analysis/FormatString.cpp +++ b/lib/Analysis/FormatString.cpp @@ -225,10 +225,10 @@ bool ArgTypeResult::matchesType(ASTContext &C, QualType argTy) const { break; case BuiltinType::Char_S: case BuiltinType::SChar: - return T == C.UnsignedCharTy; + return T == C.SignedCharTy; case BuiltinType::Char_U: case BuiltinType::UChar: - return T == C.SignedCharTy; + return T == C.UnsignedCharTy; case BuiltinType::Short: return T == C.UnsignedShortTy; case BuiltinType::UShort: |