| /llvm-project-15.0.7/clang/test/SemaCXX/ |
| H A D | builtin-is-constant-evaluated.cpp | 8 inline constexpr bool is_constant_evaluated() noexcept { in is_constant_evaluated() function 32 template <bool V, bool Default = std::is_constant_evaluated()> 47 char x[__builtin_is_constant_evaluated() + std::is_constant_evaluated()]; in test_array_decl() 63 return std::is_constant_evaluated() ? 42 : static_cast<size_t>(-1); in good_array_size() 67 return std::is_constant_evaluated() ? static_cast<size_t>(-1) : 13; in bad_array_size() 72 if (!std::is_constant_evaluated()) in require_constexpr() 86 alignas(std::is_constant_evaluated() ? 8 : 2) char dummy; in test_alignas_operand() 91 static_assert(std::is_constant_evaluated(), ""); in test_static_assert_operand() 97 ONE = std::is_constant_evaluated() in test_enumerator() 103 unsigned Bits : std::is_constant_evaluated(); [all …]
|
| H A D | warn-constant-evaluated-constexpr.cpp | 4 constexpr bool is_constant_evaluated() noexcept { in is_constant_evaluated() function 10 …if constexpr (std::is_constant_evaluated()) // expected-warning {{'std::is_constant_evaluated' wil… in fn1() 17 …if constexpr (!std::is_constant_evaluated()) // expected-warning {{'std::is_constant_evaluated' wi… in fn2() 24 …if constexpr (std::is_constant_evaluated() == false) // expected-warning {{'std::is_constant_evalu… in fn3() 45 if (std::is_constant_evaluated()) in nowarn1()
|
| /llvm-project-15.0.7/libcxx/test/std/utilities/meta/meta.const.eval/ |
| H A D | is_constant_evaluated.pass.cpp | 37 ASSERT_SAME_TYPE(decltype(std::is_constant_evaluated()), bool); in main() 38 ASSERT_NOEXCEPT(std::is_constant_evaluated()); in main() 39 constexpr bool p = std::is_constant_evaluated(); in main() 45 static_assert(std::is_constant_evaluated(), ""); in main() 46 bool p = std::is_constant_evaluated(); in main() 48 ASSERT_SAME_TYPE(InTemplate<std::is_constant_evaluated()>, InTemplate<true>); in main() 49 static int local_static = std::is_constant_evaluated() ? 42 : -1; in main()
|
| H A D | is_constant_evaluated.fail.cpp | 23 bool b = std::is_constant_evaluated(); in main() 26 static_assert(!std::is_constant_evaluated(), ""); in main()
|
| /llvm-project-15.0.7/clang/test/CodeGenCXX/ |
| H A D | builtin-is-constant-evaluated.cpp | 18 inline constexpr bool is_constant_evaluated() noexcept { in is_constant_evaluated() function 36 …const int n = __builtin_is_constant_evaluated() && std::is_constant_evaluated() ? 13 : 17; // n ==… in f() 76 char x1[std::is_constant_evaluated() && __builtin_is_constant_evaluated() ? 101 : 1]; in test_arr_expr() 79 char x2[std::is_constant_evaluated() && __builtin_is_constant_evaluated() ? 42 : RANDU()]; in test_arr_expr() 83 char x3[std::is_constant_evaluated() || __builtin_is_constant_evaluated() ? RANDU() : 13]; in test_arr_expr() 89 new char[std::is_constant_evaluated() || __builtin_is_constant_evaluated() ? 1 : 17]; in test_new_arr_expr() 96 const bool n = __builtin_is_constant_evaluated() && std::is_constant_evaluated(); in test_constant_initialized_local() 107 if (std::is_constant_evaluated()) { in test_ir_constant_fold() 112 std::is_constant_evaluated() ? BOOM() : OK(); in test_ir_constant_fold()
|
| H A D | cxx2b-consteval-if.cpp | 32 constexpr bool is_constant_evaluated() noexcept { 45 if(is_constant_evaluated())
|
| /llvm-project-15.0.7/libcxx/test/std/iterators/predef.iterators/iterators.common/ |
| H A D | iter_move.pass.cpp | 50 if (!std::is_constant_evaluated()) { in test() 65 if (!std::is_constant_evaluated()) { in test() 79 if (!std::is_constant_evaluated()) { in test()
|
| H A D | ctor.sentinel.pass.cpp | 30 if (!std::is_constant_evaluated()) { in test() 37 if (!std::is_constant_evaluated()) { in test()
|
| /llvm-project-15.0.7/libcxx/test/std/algorithms/ |
| H A D | ranges_robust_against_proxy_iterators.pass.cpp | 150 if (!std::is_constant_evaluated()) // `shuffle` isn't `constexpr`. in run_tests() 152 if (!std::is_constant_evaluated()) { in run_tests() 158 if (!std::is_constant_evaluated()) in run_tests() 161 if (!std::is_constant_evaluated()) in run_tests() 165 if (!std::is_constant_evaluated()) in run_tests()
|
| H A D | ranges_robust_against_nonbool_predicates.pass.cpp | 129 if (!std::is_constant_evaluated()) in test_all() 132 if (!std::is_constant_evaluated()) in test_all() 136 if (!std::is_constant_evaluated()) in test_all()
|
| H A D | ranges_robust_against_dangling.pass.cpp | 187 if (!std::is_constant_evaluated()) // `shuffle` isn't `constexpr`. in test_all() 191 if (!std::is_constant_evaluated()) in test_all() 194 if (!std::is_constant_evaluated()) in test_all() 198 if (!std::is_constant_evaluated()) in test_all()
|
| H A D | ranges_robust_against_omitting_invoke.pass.cpp | 158 if (!std::is_constant_evaluated()) in test_all() 161 if (!std::is_constant_evaluated()) in test_all() 165 if (!std::is_constant_evaluated()) in test_all()
|
| /llvm-project-15.0.7/libcxx/include/__type_traits/ |
| H A D | is_constant_evaluated.h | 22 inline constexpr bool is_constant_evaluated() noexcept { in is_constant_evaluated() function
|
| /llvm-project-15.0.7/libcxx/test/libcxx/algorithms/ |
| H A D | ranges_robust_against_copying_comparators.pass.cpp | 141 …if (!std::is_constant_evaluated()) { (void)std::ranges::inplace_merge(first, mid, last, Less(&copi… in all_the_algorithms() 142 …if (!std::is_constant_evaluated()) { (void)std::ranges::inplace_merge(a, mid, Less(&copies)); asse… in all_the_algorithms() 214 …if (!std::is_constant_evaluated()) { (void)std::ranges::stable_partition(first, last, UnaryTrue(&c… in all_the_algorithms() 215 …if (!std::is_constant_evaluated()) { (void)std::ranges::stable_partition(a, UnaryTrue(&copies)); a… in all_the_algorithms() 216 …if (!std::is_constant_evaluated()) { (void)std::ranges::stable_sort(first, last, Less(&copies)); a… in all_the_algorithms() 217 …if (!std::is_constant_evaluated()) { (void)std::ranges::stable_sort(a, Less(&copies)); assert(copi… in all_the_algorithms()
|
| H A D | ranges_robust_against_copying_projections.pass.cpp | 124 …if (!std::is_constant_evaluated()) { (void)std::ranges::inplace_merge(first, mid, last, Less(), Pr… in all_the_algorithms() 125 …if (!std::is_constant_evaluated()) { (void)std::ranges::inplace_merge(a, mid, Less(), Proj(&copies… in all_the_algorithms() 205 …if (!std::is_constant_evaluated()) { (void)std::ranges::stable_partition(first, last, UnaryTrue(),… in all_the_algorithms() 206 …if (!std::is_constant_evaluated()) { (void)std::ranges::stable_partition(a, UnaryTrue(), Proj(&cop… in all_the_algorithms() 207 …if (!std::is_constant_evaluated()) { (void)std::ranges::stable_sort(first, last, Less(), Proj(&cop… in all_the_algorithms() 208 …if (!std::is_constant_evaluated()) { (void)std::ranges::stable_sort(a, Less(), Proj(&copies)); ass… in all_the_algorithms()
|
| /llvm-project-15.0.7/libcxx/include/__memory/ |
| H A D | assume_aligned.h | 34 if (is_constant_evaluated()) { in assume_aligned()
|
| /llvm-project-15.0.7/libcxx/test/libcxx/utilities/format/format.string/format.string.std/ |
| H A D | test_exception.h | 43 if (!std::is_constant_evaluated()) in test_exception()
|
| /llvm-project-15.0.7/libcxx/include/__format/ |
| H A D | format_parse_context.h | 79 if (is_constant_evaluated() && __id >= __num_args_) in check_arg_id()
|
| /llvm-project-15.0.7/libcxx/test/std/numerics/numeric.ops/accumulate/ |
| H A D | accumulate_op.pass.cpp | 118 if (!std::is_constant_evaluated()) in test()
|
| /llvm-project-15.0.7/libcxx/test/std/numerics/numeric.ops/partial.sum/ |
| H A D | partial_sum_op.pass.cpp | 141 if (!std::is_constant_evaluated()) in test()
|
| /llvm-project-15.0.7/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ |
| H A D | decrement.pass.cpp | 91 if (!std::is_constant_evaluated()) { in test()
|
| /llvm-project-15.0.7/libcxx/test/std/utilities/utility/pairs/pairs.spec/ |
| H A D | three_way_comparison.pass.cpp | 92 if (!std::is_constant_evaluated()) in test()
|
| /llvm-project-15.0.7/libcxx/test/std/numerics/numeric.ops/inner.product/ |
| H A D | inner_product_comp.pass.cpp | 158 if (!std::is_constant_evaluated()) in test()
|
| /llvm-project-15.0.7/libcxx/test/std/numerics/numeric.ops/adjacent.difference/ |
| H A D | adjacent_difference_op.pass.cpp | 187 if (!std::is_constant_evaluated()) in test()
|
| /llvm-project-15.0.7/libcxx/test/std/library/description/conventions/expos.only.func/ |
| H A D | synth_three_way.pass.cpp | 167 if (!std::is_constant_evaluated()) in test()
|