--- b/contrib/llvm-project/clang/lib/Sema/SemaInit.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaInit.cpp @@ -9150,9 +9150,9 @@ static void DiagnoseNarrowingInInitList(Sema &S, return; case NK_Type_Narrowing: - // This was a floating-to-integer conversion, which is always considered a - // narrowing conversion even if the value is a constant and can be - // represented exactly as an integer. + // This was a floating-to-integer conversion or a boolean conversion from a + // pointer, which is always considered a narrowing conversion even if the + // value is a constant and can be represented exactly as an integer. S.Diag(PostInit->getBeginLoc(), NarrowingErrs(S.getLangOpts()) ? diag::ext_init_list_type_narrowing : diag::warn_init_list_type_narrowing) --- b/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp @@ -314,8 +314,8 @@ NarrowingKind StandardConversionSequence::getNarrowingKind( if (FromType->isIntegralOrUnscopedEnumerationType()) goto IntegralConversion; // Boolean conversions can be from pointers and pointers to members - // [conv.bool], and those aren't considered narrowing conversions. - return NK_Not_Narrowing; + // [conv.bool], which are considered narrowing conversions. + return NK_Type_Narrowing; // -- from a floating-point type to an integer type, or //