Home
last modified time | relevance | path

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

12345678910>>...18

/dports/lang/gcc12-devel/gcc-12-20211205/gcc/testsuite/g++.dg/cpp2a/
H A Dis-constant-evaluated12.C7 is_constant_evaluated () noexcept in is_constant_evaluated() function
13 template <int I = []() constexpr { if (std::is_constant_evaluated()) return 1; return 0; }()>
16 template <int I = [](){ if (std::is_constant_evaluated()) return 1; return 0; }()>
33 if (std::is_constant_evaluated ()) // { dg-warning "always evaluates to false" } in foo()
46 if (std::is_constant_evaluated ()) in bar()
60 if (std::is_constant_evaluated ()) // { dg-warning "always evaluates to true" } in baz()
68 if (({ static bool a = std::is_constant_evaluated (); a; })) in qux()
70 if (({ bool a = std::is_constant_evaluated (); a; })) in qux()
72 if (static bool a = std::is_constant_evaluated (); a) in qux()
74 if (bool a = std::is_constant_evaluated (); a) in qux()
[all …]
H A Dis-constant-evaluated2.C5 is_constant_evaluated () noexcept in is_constant_evaluated() function
11 X<is_constant_evaluated ()> x; // type X<true>
13 int a = is_constant_evaluated () ? y : 1; // initializes a to 1
14 int b = is_constant_evaluated () ? 2 : y; // initializes b to 2
16 int d = is_constant_evaluated (); // initializes d to 1
17 int e = d + is_constant_evaluated (); // initializes e to 1 + 0
29 const int n = is_constant_evaluated () ? 13 : 17; // n == 13
38 const int n = is_constant_evaluated() ? 13 : 17;
40 X<is_constant_evaluated() ? 13 : 17> x2;
51 S s = { is_constant_evaluated () ? 2 : 3, y };
[all …]
/dports/devel/tinygo/tinygo-0.14.1/llvm-project/clang/test/SemaCXX/
H A Dbuiltin-is-constant-evaluated.cpp6 inline constexpr bool is_constant_evaluated() noexcept { in is_constant_evaluated() function
30 template <bool V, bool Default = std::is_constant_evaluated()>
45 char x[__builtin_is_constant_evaluated() + std::is_constant_evaluated()]; in test_array_decl()
61 return std::is_constant_evaluated() ? 42 : static_cast<size_t>(-1); in good_array_size()
65 return std::is_constant_evaluated() ? static_cast<size_t>(-1) : 13; in bad_array_size()
70 if (!std::is_constant_evaluated()) in require_constexpr()
84 alignas(std::is_constant_evaluated() ? 8 : 2) char dummy; in test_alignas_operand()
89 static_assert(std::is_constant_evaluated(), ""); in test_static_assert_operand()
95 ONE = std::is_constant_evaluated() in test_enumerator()
101 unsigned Bits : std::is_constant_evaluated();
[all …]
/dports/devel/llvm11/llvm-11.0.1.src/tools/clang/test/SemaCXX/
H A Dbuiltin-is-constant-evaluated.cpp6 inline constexpr bool is_constant_evaluated() noexcept { in is_constant_evaluated() function
30 template <bool V, bool Default = std::is_constant_evaluated()>
45 char x[__builtin_is_constant_evaluated() + std::is_constant_evaluated()]; in test_array_decl()
61 return std::is_constant_evaluated() ? 42 : static_cast<size_t>(-1); in good_array_size()
65 return std::is_constant_evaluated() ? static_cast<size_t>(-1) : 13; in bad_array_size()
70 if (!std::is_constant_evaluated()) in require_constexpr()
84 alignas(std::is_constant_evaluated() ? 8 : 2) char dummy; in test_alignas_operand()
89 static_assert(std::is_constant_evaluated(), ""); in test_static_assert_operand()
95 ONE = std::is_constant_evaluated() in test_enumerator()
101 unsigned Bits : std::is_constant_evaluated();
[all …]
/dports/devel/llvm-cheri/llvm-project-37c49ff00e3eadce5d8703fdc4497f28458c64a8/clang/test/SemaCXX/
H A Dbuiltin-is-constant-evaluated.cpp6 inline constexpr bool is_constant_evaluated() noexcept { in is_constant_evaluated() function
30 template <bool V, bool Default = std::is_constant_evaluated()>
45 char x[__builtin_is_constant_evaluated() + std::is_constant_evaluated()]; in test_array_decl()
61 return std::is_constant_evaluated() ? 42 : static_cast<size_t>(-1); in good_array_size()
65 return std::is_constant_evaluated() ? static_cast<size_t>(-1) : 13; in bad_array_size()
70 if (!std::is_constant_evaluated()) in require_constexpr()
84 alignas(std::is_constant_evaluated() ? 8 : 2) char dummy; in test_alignas_operand()
89 static_assert(std::is_constant_evaluated(), ""); in test_static_assert_operand()
95 ONE = std::is_constant_evaluated() in test_enumerator()
101 unsigned Bits : std::is_constant_evaluated();
[all …]
/dports/devel/llvm90/llvm-9.0.1.src/tools/clang/test/SemaCXX/
H A Dbuiltin-is-constant-evaluated.cpp6 inline constexpr bool is_constant_evaluated() noexcept { in is_constant_evaluated() function
30 template <bool V, bool Default = std::is_constant_evaluated()>
45 char x[__builtin_is_constant_evaluated() + std::is_constant_evaluated()]; in test_array_decl()
61 return std::is_constant_evaluated() ? 42 : static_cast<size_t>(-1); in good_array_size()
65 return std::is_constant_evaluated() ? static_cast<size_t>(-1) : 13; in bad_array_size()
70 if (!std::is_constant_evaluated()) in require_constexpr()
84 alignas(std::is_constant_evaluated() ? 8 : 2) char dummy; in test_alignas_operand()
89 static_assert(std::is_constant_evaluated(), ""); in test_static_assert_operand()
95 ONE = std::is_constant_evaluated() in test_enumerator()
101 unsigned Bits : std::is_constant_evaluated();
[all …]
/dports/devel/llvm10/llvm-10.0.1.src/tools/clang/test/SemaCXX/
H A Dbuiltin-is-constant-evaluated.cpp6 inline constexpr bool is_constant_evaluated() noexcept { in is_constant_evaluated() function
30 template <bool V, bool Default = std::is_constant_evaluated()>
45 char x[__builtin_is_constant_evaluated() + std::is_constant_evaluated()]; in test_array_decl()
61 return std::is_constant_evaluated() ? 42 : static_cast<size_t>(-1); in good_array_size()
65 return std::is_constant_evaluated() ? static_cast<size_t>(-1) : 13; in bad_array_size()
70 if (!std::is_constant_evaluated()) in require_constexpr()
84 alignas(std::is_constant_evaluated() ? 8 : 2) char dummy; in test_alignas_operand()
89 static_assert(std::is_constant_evaluated(), ""); in test_static_assert_operand()
95 ONE = std::is_constant_evaluated() in test_enumerator()
101 unsigned Bits : std::is_constant_evaluated();
[all …]
/dports/www/chromium-legacy/chromium-88.0.4324.182/third_party/llvm/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 …]
/dports/devel/wasi-libcxx/llvm-project-13.0.1.src/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 …]
/dports/devel/llvm12/llvm-project-12.0.1.src/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 …]
/dports/devel/llvm-devel/llvm-project-f05c95f10fc1d8171071735af8ad3a9e87633120/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 …]
/dports/devel/wasi-compiler-rt13/llvm-project-13.0.1.src/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 …]
/dports/lang/clang-mesa/clang-13.0.1.src/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 …]
/dports/lang/rust/rustc-1.58.1-src/src/llvm-project/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 …]
/dports/devel/wasi-compiler-rt12/llvm-project-12.0.1.src/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 …]
/dports/devel/llvm13/llvm-project-13.0.1.src/clang/test/SemaCXX/
H A Dbuiltin-is-constant-evaluated.cpp8 inline constexpr bool is_constant_evaluated() noexcept { in bcp()
32 template <bool V, bool Default = std::is_constant_evaluated()>
47 char x[__builtin_is_constant_evaluated() + std::is_constant_evaluated()];
63 return std::is_constant_evaluated() ? 42 : static_cast<size_t>(-1);
67 return std::is_constant_evaluated() ? static_cast<size_t>(-1) : 13;
72 if (!std::is_constant_evaluated())
86 alignas(std::is_constant_evaluated() ? 8 : 2) char dummy; in mutate2()
91 static_assert(std::is_constant_evaluated(), ""); in internal_mutation()
97 ONE = std::is_constant_evaluated() in mutate3()
103 unsigned Bits : std::is_constant_evaluated(); in mutate4()
[all …]
/dports/lang/gcc12-devel/gcc-12-20211205/gcc/testsuite/g++.dg/cpp23/
H A Dconsteval-if3.C6 is_constant_evaluated () noexcept in is_constant_evaluated() function
12 X<is_constant_evaluated ()> x; // type X<true>
14 int a = is_constant_evaluated () ? y : 1; // initializes a to 1
15 int b = is_constant_evaluated () ? 2 : y; // initializes b to 2
17 int d = is_constant_evaluated (); // initializes d to 1
18 int e = d + is_constant_evaluated (); // initializes e to 1 + 0
30 const int n = is_constant_evaluated () ? 13 : 17; // n == 13
39 const int n = is_constant_evaluated() ? 13 : 17;
41 X<is_constant_evaluated() ? 13 : 17> x2;
52 S s = { is_constant_evaluated () ? 2 : 3, y };
[all …]
/dports/lang/gcc9/gcc-9.4.0/gcc/testsuite/g++.dg/cpp2a/
H A Dis-constant-evaluated2.C5 is_constant_evaluated () noexcept in is_constant_evaluated() function
11 X<is_constant_evaluated ()> x; // type X<true>
13 int a = is_constant_evaluated () ? y : 1; // initializes a to 1
14 int b = is_constant_evaluated () ? 2 : y; // initializes b to 2
16 int d = is_constant_evaluated (); // initializes d to 1
17 int e = d + is_constant_evaluated (); // initializes e to 1 + 0
29 const int n = is_constant_evaluated () ? 13 : 17; // n == 13
38 const int n = is_constant_evaluated() ? 13 : 17;
40 X<is_constant_evaluated() ? 13 : 17> x2;
51 S s = { is_constant_evaluated () ? 2 : 3, y };
[all …]
/dports/devel/avr-gcc/gcc-10.2.0/gcc/testsuite/g++.dg/cpp2a/
H A Dis-constant-evaluated2.C5 is_constant_evaluated () noexcept in is_constant_evaluated() function
11 X<is_constant_evaluated ()> x; // type X<true>
13 int a = is_constant_evaluated () ? y : 1; // initializes a to 1
14 int b = is_constant_evaluated () ? 2 : y; // initializes b to 2
16 int d = is_constant_evaluated (); // initializes d to 1
17 int e = d + is_constant_evaluated (); // initializes e to 1 + 0
29 const int n = is_constant_evaluated () ? 13 : 17; // n == 13
38 const int n = is_constant_evaluated() ? 13 : 17;
40 X<is_constant_evaluated() ? 13 : 17> x2;
51 S s = { is_constant_evaluated () ? 2 : 3, y };
[all …]
/dports/lang/gcc11-devel/gcc-11-20211009/gcc/testsuite/g++.dg/cpp2a/
H A Dis-constant-evaluated2.C5 is_constant_evaluated () noexcept in is_constant_evaluated() function
11 X<is_constant_evaluated ()> x; // type X<true>
13 int a = is_constant_evaluated () ? y : 1; // initializes a to 1
14 int b = is_constant_evaluated () ? 2 : y; // initializes b to 2
16 int d = is_constant_evaluated (); // initializes d to 1
17 int e = d + is_constant_evaluated (); // initializes e to 1 + 0
29 const int n = is_constant_evaluated () ? 13 : 17; // n == 13
38 const int n = is_constant_evaluated() ? 13 : 17;
40 X<is_constant_evaluated() ? 13 : 17> x2;
51 S s = { is_constant_evaluated () ? 2 : 3, y };
[all …]
/dports/lang/gcc11/gcc-11.2.0/gcc/testsuite/g++.dg/cpp2a/
H A Dis-constant-evaluated2.C5 is_constant_evaluated () noexcept in is_constant_evaluated() function
11 X<is_constant_evaluated ()> x; // type X<true>
13 int a = is_constant_evaluated () ? y : 1; // initializes a to 1
14 int b = is_constant_evaluated () ? 2 : y; // initializes b to 2
16 int d = is_constant_evaluated (); // initializes d to 1
17 int e = d + is_constant_evaluated (); // initializes e to 1 + 0
29 const int n = is_constant_evaluated () ? 13 : 17; // n == 13
38 const int n = is_constant_evaluated() ? 13 : 17;
40 X<is_constant_evaluated() ? 13 : 17> x2;
51 S s = { is_constant_evaluated () ? 2 : 3, y };
[all …]
/dports/lang/gcc9-aux/gcc-9.1.0/gcc/testsuite/g++.dg/cpp2a/
H A Dis-constant-evaluated2.C5 is_constant_evaluated () noexcept in is_constant_evaluated() function
11 X<is_constant_evaluated ()> x; // type X<true>
13 int a = is_constant_evaluated () ? y : 1; // initializes a to 1
14 int b = is_constant_evaluated () ? 2 : y; // initializes b to 2
16 int d = is_constant_evaluated (); // initializes d to 1
17 int e = d + is_constant_evaluated (); // initializes e to 1 + 0
29 const int n = is_constant_evaluated () ? 13 : 17; // n == 13
38 const int n = is_constant_evaluated() ? 13 : 17;
40 X<is_constant_evaluated() ? 13 : 17> x2;
51 S s = { is_constant_evaluated () ? 2 : 3, y };
[all …]
/dports/misc/cxx_atomics_pic/gcc-11.2.0/gcc/testsuite/g++.dg/cpp2a/
H A Dis-constant-evaluated2.C5 is_constant_evaluated () noexcept in is_constant_evaluated() function
11 X<is_constant_evaluated ()> x; // type X<true>
13 int a = is_constant_evaluated () ? y : 1; // initializes a to 1
14 int b = is_constant_evaluated () ? 2 : y; // initializes b to 2
16 int d = is_constant_evaluated (); // initializes d to 1
17 int e = d + is_constant_evaluated (); // initializes e to 1 + 0
29 const int n = is_constant_evaluated () ? 13 : 17; // n == 13
38 const int n = is_constant_evaluated() ? 13 : 17;
40 X<is_constant_evaluated() ? 13 : 17> x2;
51 S s = { is_constant_evaluated () ? 2 : 3, y };
[all …]
/dports/lang/gcc10/gcc-10.3.0/gcc/testsuite/g++.dg/cpp2a/
H A Dis-constant-evaluated2.C5 is_constant_evaluated () noexcept in is_constant_evaluated() function
11 X<is_constant_evaluated ()> x; // type X<true>
13 int a = is_constant_evaluated () ? y : 1; // initializes a to 1
14 int b = is_constant_evaluated () ? 2 : y; // initializes b to 2
16 int d = is_constant_evaluated (); // initializes d to 1
17 int e = d + is_constant_evaluated (); // initializes e to 1 + 0
29 const int n = is_constant_evaluated () ? 13 : 17; // n == 13
38 const int n = is_constant_evaluated() ? 13 : 17;
40 X<is_constant_evaluated() ? 13 : 17> x2;
51 S s = { is_constant_evaluated () ? 2 : 3, y };
[all …]
/dports/lang/gcc9-devel/gcc-9-20211007/gcc/testsuite/g++.dg/cpp2a/
H A Dis-constant-evaluated2.C5 is_constant_evaluated () noexcept in is_constant_evaluated() function
11 X<is_constant_evaluated ()> x; // type X<true>
13 int a = is_constant_evaluated () ? y : 1; // initializes a to 1
14 int b = is_constant_evaluated () ? 2 : y; // initializes b to 2
16 int d = is_constant_evaluated (); // initializes d to 1
17 int e = d + is_constant_evaluated (); // initializes e to 1 + 0
29 const int n = is_constant_evaluated () ? 13 : 17; // n == 13
38 const int n = is_constant_evaluated() ? 13 : 17;
40 X<is_constant_evaluated() ? 13 : 17> x2;
51 S s = { is_constant_evaluated () ? 2 : 3, y };
[all …]

12345678910>>...18