[clang-tools-extra] [clang-tidy] Improve `google-explicit-constructor` checks handling of `explicit(bool)` (PR #82689)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 27 12:13:18 PST 2024


================
@@ -79,8 +79,10 @@ static bool isStdInitializerList(QualType Type) {
 }
 
 void ExplicitConstructorCheck::check(const MatchFinder::MatchResult &Result) {
-  constexpr char WarningMessage[] =
+  constexpr char NoExpressionWarningMessage[] =
       "%0 must be marked explicit to avoid unintentional implicit conversions";
+  constexpr char WithExpressionWarningMessage[] =
+      "%0 explicit expression evaluated to false";
----------------
PiotrZSL wrote:

Maybe ? ```evaluates to `false` ```

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


More information about the cfe-commits mailing list