[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
Mon Apr 13 01:02:44 PDT 2026


================
@@ -355,4 +355,12 @@ void typedef_context() {
   // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: narrowing conversion from 'myint64_t' (aka 'long long') to signed type 'int' is implementation-defined [bugprone-narrowing-conversions]
 }
 
+void testBoolToSignedType() {
+  bool b = true;
----------------
maochuanjun wrote:

ok,already add

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


More information about the cfe-commits mailing list