diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-07-13 17:35:14 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-07-13 17:35:14 +0000 |
commit | dc00d8158db573f4a1f91cfaa2a89171c2e5f637 (patch) | |
tree | 68cff8fe823021b8a184177cf3d85e01d9856064 /lib/Analysis/FormatString.cpp | |
parent | 45eb7022ff059ff5a291e24f57ff56428a1e8210 (diff) |
Re-relax conversion specifier checking for printf format strings and conversion specifiers. My recent change was a mistake.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135048 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/FormatString.cpp')
-rw-r--r-- | lib/Analysis/FormatString.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Analysis/FormatString.cpp b/lib/Analysis/FormatString.cpp index 9a8639015c..5f3cd4c615 100644 --- a/lib/Analysis/FormatString.cpp +++ b/lib/Analysis/FormatString.cpp @@ -219,16 +219,17 @@ bool ArgTypeResult::matchesType(ASTContext &C, QualType argTy) const { argTy = C.getCanonicalType(argTy).getUnqualifiedType(); if (T == argTy) return true; + // Check for "compatible types". if (const BuiltinType *BT = argTy->getAs<BuiltinType>()) switch (BT->getKind()) { default: break; case BuiltinType::Char_S: case BuiltinType::SChar: - return T == C.SignedCharTy; - case BuiltinType::Char_U: - case BuiltinType::UChar: return T == C.UnsignedCharTy; + case BuiltinType::Char_U: + case BuiltinType::UChar: + return T == C.SignedCharTy; case BuiltinType::Short: return T == C.UnsignedShortTy; case BuiltinType::UShort: |