Author: Richard Smith Date: 2020-08-06T19:06:06-07:00 New Revision: 2f1fffab73f83e6a729cb4d68a99f930e44bc7a8
URL: https://github.com/llvm/llvm-project/commit/2f1fffab73f83e6a729cb4d68a99f930e44bc7a8 DIFF: https://github.com/llvm/llvm-project/commit/2f1fffab73f83e6a729cb4d68a99f930e44bc7a8.diff LOG: Disable clang-tidy test that started failing after clang commit ed5a18f. This checker appears to be intentionally not diagnosing cases where an operator appearing in a duplicated expression might have side-effects; Clang is now modeling fold-expressions as having an unresolved operator name within them, so they now trip up this check. Added: Modified: clang-tools-extra/test/clang-tidy/checkers/misc-redundant-expression.cpp Removed: ################################################################################ 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 c47ef7d36ff5..46e84aa7614f 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 <class... Values> -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 <class... Values> +//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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits