================
@@ -168,6 +171,33 @@ void testFunctionalCastWithInitExpr(unsigned a) {
unsigned c = unsigned{0};
}
+void testBinaryOperatorRedundantCasting() {
+ const auto diff_types_operands1 { static_cast<float>(1.0f + 1) };
----------------
vbvictor wrote:
As for options, there are some for this check (like IgnoreTypeAliases).
So all you need is to add new option (look at how others are made) and pass it
to `anyBinaryOperatorOperandsTypesEqualToOperatorResultType`.
Option name could be `IgnoreImplicitTypePromotion` (I just asked AI), will be
false by default. If user make it `true` - they can get previous behavoir.
https://github.com/llvm/llvm-project/pull/191386
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits