diff --git a/clang-tools-extra/test/clang-tidy/checkers/misc-redundant-expression.cpp b/clang-tools-extra/test/clang-tidy/checkers/misc-redundant-expression.cpp index c47ef7d36ff527..46e84aa7614fd3 100644 --- a/clang-tools-extra/test/clang-tidy/checkers/misc-redundant-expression.cpp +++ b/clang-tools-extra/test/clang-tidy/checkers/misc-redundant-expression.cpp @@ -794,9 +794,16 @@ struct Bar { } }; -template -struct Bar2 { - static_assert((... && (sizeof(Values) > 0)) == (... && (sizeof(Values) > 0))); - // CHECK-MESSAGES: :[[@LINE-1]]:47: warning: both sides of operator are equivalent [misc-redundant-expression] -}; +// FIXME: It's not clear that we should be diagnosing this. The `&&` operator +// here is unresolved and could resolve to an overloaded operator that might +// have side-effects on its operands. For other constructs with the same +// property (eg, the `S2` cases above) we suppress this diagnostic. This +// started failing when Clang started properly modeling the fold-expression as +// containing an unresolved operator name. +//template +//struct Bar2 { +// static_assert((... && (sizeof(Values) > 0)) == (... && (sizeof(Values) > 0))); +// // -MESSAGES: :[[@LINE-1]]:47: warning: both sides of operator are equivalent [misc-redundant-expression] +//}; + } // namespace no_crash