Home
last modified time | relevance | path

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

/external/llvm-project/clang/test/SemaCXX/
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()
55 …case std::is_constant_evaluated() + __builtin_is_constant_evaluated(): // expected-note {{previous… in test_case_stmt()
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()
79 …auto *x = new int[std::is_constant_evaluated() ? 1 : TooLarge]; // expected-error {{array is … in test_new_expr()
80 auto *x2 = new int[std::is_constant_evaluated() ? TooLarge : 1]; // OK in test_new_expr()
81 …auto *y = new int[1][std::is_constant_evaluated() ? TooLarge : 1]{}; // expected-error {{array is … in test_new_expr()
[all …]
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()
/external/llvm-project/clang/test/CodeGenCXX/
Dbuiltin-is-constant-evaluated.cpp17 inline constexpr bool is_constant_evaluated() noexcept { in is_constant_evaluated() function
35 …const int n = __builtin_is_constant_evaluated() && std::is_constant_evaluated() ? 13 : 17; // n ==… in f()
75 char x1[std::is_constant_evaluated() && __builtin_is_constant_evaluated() ? 101 : 1]; in test_arr_expr()
78 char x2[std::is_constant_evaluated() && __builtin_is_constant_evaluated() ? 42 : RANDU()]; in test_arr_expr()
82 char x3[std::is_constant_evaluated() || __builtin_is_constant_evaluated() ? RANDU() : 13]; in test_arr_expr()
88 new char[std::is_constant_evaluated() || __builtin_is_constant_evaluated() ? 1 : 17]; in test_new_arr_expr()
95 const bool n = __builtin_is_constant_evaluated() && std::is_constant_evaluated(); in test_constant_initialized_local()
106 if (std::is_constant_evaluated()) { in test_ir_constant_fold()
111 std::is_constant_evaluated() ? BOOM() : OK(); in test_ir_constant_fold()
/external/llvm-project/libcxx/test/std/utilities/meta/meta.const.eval/
Dis_constant_evaluated.pass.cpp43 ASSERT_SAME_TYPE(decltype(std::is_constant_evaluated()), bool); in main()
44 ASSERT_NOEXCEPT(std::is_constant_evaluated()); in main()
45 constexpr bool p = std::is_constant_evaluated(); in main()
51 static_assert(std::is_constant_evaluated(), ""); in main()
52 bool p = std::is_constant_evaluated(); in main()
54 ASSERT_SAME_TYPE(InTemplate<std::is_constant_evaluated()>, InTemplate<true>); in main()
55 static int local_static = std::is_constant_evaluated() ? 42 : -1; in main()
Dis_constant_evaluated.fail.cpp23 bool b = std::is_constant_evaluated(); in main()
26 static_assert(!std::is_constant_evaluated(), ""); in main()
/external/llvm-project/libcxx/test/std/numerics/numeric.ops/accumulate/
Daccumulate_op.pass.cpp120 if (!std::is_constant_evaluated()) in test()
/external/llvm-project/libcxx/test/std/numerics/numeric.ops/partial.sum/
Dpartial_sum_op.pass.cpp143 if (!std::is_constant_evaluated()) in test()
/external/llvm-project/libcxx/test/std/numerics/numeric.ops/inner.product/
Dinner_product_comp.pass.cpp160 if (!std::is_constant_evaluated()) in test()
/external/llvm-project/libcxx/test/std/numerics/numeric.ops/adjacent.difference/
Dadjacent_difference_op.pass.cpp189 if (!std::is_constant_evaluated()) in test()
/external/llvm-project/libcxx/docs/
DCxx2aStatusPaperStatus.csv59 "`P0595R2 <https://wg21.link/P0595R2>`__","CWG","P0595R2 std::is_constant_evaluated()","San Diego",…
/external/llvm-project/libcxx/include/
Dtype_traits4308 inline constexpr bool is_constant_evaluated() noexcept {