aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/clang/lib/AST/FormatString.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-01-22 21:31:48 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-01-22 21:31:48 +0000
commita7dea1671b87c07d2d266f836bfa8b58efc7c134 (patch)
treeff67344b3b18fc14e0cec322849afb4e3b94ea56 /contrib/llvm-project/clang/lib/AST/FormatString.cpp
parent5c713029ff7939f90b6f96df914953e758855a7f (diff)
parent519fc96c475680de2cc49e7811dbbfadb912cbcc (diff)
Notes
Diffstat (limited to 'contrib/llvm-project/clang/lib/AST/FormatString.cpp')
-rw-r--r--contrib/llvm-project/clang/lib/AST/FormatString.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/llvm-project/clang/lib/AST/FormatString.cpp b/contrib/llvm-project/clang/lib/AST/FormatString.cpp
index 578d5bc56733..fcc0b3b11e25 100644
--- a/contrib/llvm-project/clang/lib/AST/FormatString.cpp
+++ b/contrib/llvm-project/clang/lib/AST/FormatString.cpp
@@ -359,6 +359,7 @@ ArgType::matchesType(ASTContext &C, QualType argTy) const {
case BuiltinType::SChar:
case BuiltinType::UChar:
case BuiltinType::Char_U:
+ case BuiltinType::Bool:
return Match;
}
return NoMatch;
@@ -386,6 +387,9 @@ ArgType::matchesType(ASTContext &C, QualType argTy) const {
case BuiltinType::SChar:
case BuiltinType::Char_U:
case BuiltinType::UChar:
+ case BuiltinType::Bool:
+ if (T == C.UnsignedShortTy || T == C.ShortTy)
+ return NoMatchTypeConfusion;
return T == C.UnsignedCharTy || T == C.SignedCharTy ? Match
: NoMatch;
case BuiltinType::Short: