Home
last modified time | relevance | path

Searched refs:is_constant_evaluated (Results 1 – 25 of 37) sorted by relevance

12

/llvm-project-15.0.7/clang/test/SemaCXX/
H A Dbuiltin-is-constant-evaluated.cpp8 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 Dwarn-constant-evaluated-constexpr.cpp4 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 Dis_constant_evaluated.pass.cpp37 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 Dis_constant_evaluated.fail.cpp23 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 Dbuiltin-is-constant-evaluated.cpp18 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 Dcxx2b-consteval-if.cpp32 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 Diter_move.pass.cpp50 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 Dctor.sentinel.pass.cpp30 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 Dranges_robust_against_proxy_iterators.pass.cpp150 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 Dranges_robust_against_nonbool_predicates.pass.cpp129 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 Dranges_robust_against_dangling.pass.cpp187 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 Dranges_robust_against_omitting_invoke.pass.cpp158 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 Dis_constant_evaluated.h22 inline constexpr bool is_constant_evaluated() noexcept { in is_constant_evaluated() function
/llvm-project-15.0.7/libcxx/test/libcxx/algorithms/
H A Dranges_robust_against_copying_comparators.pass.cpp141 …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 Dranges_robust_against_copying_projections.pass.cpp124 …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 Dassume_aligned.h34 if (is_constant_evaluated()) { in assume_aligned()
/llvm-project-15.0.7/libcxx/test/libcxx/utilities/format/format.string/format.string.std/
H A Dtest_exception.h43 if (!std::is_constant_evaluated()) in test_exception()
/llvm-project-15.0.7/libcxx/include/__format/
H A Dformat_parse_context.h79 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 Daccumulate_op.pass.cpp118 if (!std::is_constant_evaluated()) in test()
/llvm-project-15.0.7/libcxx/test/std/numerics/numeric.ops/partial.sum/
H A Dpartial_sum_op.pass.cpp141 if (!std::is_constant_evaluated()) in test()
/llvm-project-15.0.7/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/
H A Ddecrement.pass.cpp91 if (!std::is_constant_evaluated()) { in test()
/llvm-project-15.0.7/libcxx/test/std/utilities/utility/pairs/pairs.spec/
H A Dthree_way_comparison.pass.cpp92 if (!std::is_constant_evaluated()) in test()
/llvm-project-15.0.7/libcxx/test/std/numerics/numeric.ops/inner.product/
H A Dinner_product_comp.pass.cpp158 if (!std::is_constant_evaluated()) in test()
/llvm-project-15.0.7/libcxx/test/std/numerics/numeric.ops/adjacent.difference/
H A Dadjacent_difference_op.pass.cpp187 if (!std::is_constant_evaluated()) in test()
/llvm-project-15.0.7/libcxx/test/std/library/description/conventions/expos.only.func/
H A Dsynth_three_way.pass.cpp167 if (!std::is_constant_evaluated()) in test()

12