================ @@ -202,7 +208,13 @@ void UseDefaultMemberInitCheck::registerMatchers(MatchFinder *Finder) { unaryOperator(hasAnyOperatorName("+", "-"), hasUnaryOperand(floatLiteral())), cxxBoolLiteral(), cxxNullPtrLiteralExpr(), implicitValueInitExpr(), - declRefExpr(to(enumConstantDecl()))); + declRefExpr(to(enumConstantDecl())), + binaryOperator(hasLHS(anyOf(integerLiteral(), floatLiteral(), ---------------- RiverDave wrote:
Done. I've improved not only my part but think I got rid of some redundancies to make it more readable. There's still some duplicate code like: ```cpp hasOperands(anyOf(NumericLiteral, EnumRef, binaryOperator()), anyOf(NumericLiteral, EnumRef, binaryOperator()))); ``` I'm not really sure if there's another way of avoiding that. for the rest let me know if this is the right direction. https://github.com/llvm/llvm-project/pull/129370 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits