[clang-tools-extra] [clang-tidy] Fix a false positive when converting a bool to a signed integer type (PR #191696)

Mao Chuanjun via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 12 06:27:22 PDT 2026


================
@@ -402,6 +402,9 @@ void NarrowingConversionsCheck::handleIntegralCast(const ASTContext &Context,
       return;
     const BuiltinType *FromType = getBuiltinType(Rhs);
 
+    if (FromType->getKind() == BuiltinType::Bool)
----------------
maochuanjun wrote:

like this?

https://github.com/llvm/llvm-project/pull/191696


More information about the cfe-commits mailing list