[clang-tools-extra] b284767 - Reinstate check that we don't crash.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 6 19:08:25 PDT 2020
Author: Richard Smith
Date: 2020-08-06T19:07:50-07:00
New Revision: b2847671b83f6acb71a78d4e37bd57967c858f4e
URL: https://github.com/llvm/llvm-project/commit/b2847671b83f6acb71a78d4e37bd57967c858f4e
DIFF: https://github.com/llvm/llvm-project/commit/b2847671b83f6acb71a78d4e37bd57967c858f4e.diff
LOG: Reinstate check that we don't crash.
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 46e84aa7614f..075c3aca9d03 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,16 +794,16 @@ struct Bar {
}
};
-// 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]
-//};
+template <class... Values>
+struct Bar2 {
+ static_assert((... && (sizeof(Values) > 0)) == (... && (sizeof(Values) > 0)));
+ // 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.
+ // FIXME-MESSAGES: :[[@LINE-1]]:47: warning: both sides of operator are equivalent [misc-redundant-expression]
+};
} // namespace no_crash
More information about the cfe-commits
mailing list