[libcxx-commits] [libcxx] [libc++][test] Fix simple warnings (PR #74186)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Dec 4 05:13:53 PST 2023
================
@@ -94,8 +94,13 @@ struct Test1OutIters {
TEST_CONSTEXPR_CXX20 bool test() {
types::for_each(types::cpp17_input_iterator_list<int*>(), TestOutIters());
- if (TEST_STD_VER >= 23 || !TEST_IS_CONSTANT_EVALUATED)
+
+#if TEST_STD_VER < 23
----------------
ldionne wrote:
Instead of `# define TEST_IS_CONSTANT_EVALUATED false`, can we instead do something like
```
__attribute__((__noinline__)) constexpr bool test_is_constant_evaluated() { return false; }
# define TEST_IS_CONSTANT_EVALUATED ::test_is_constant_evaluated()
```
That way we would probably avoid that warning without having to write our conditionals in a super roundabout manner.
https://github.com/llvm/llvm-project/pull/74186
More information about the libcxx-commits
mailing list