Lines Matching refs:constexpr

4 constexpr int extract(const S &s);
7 constexpr S() : n(extract(*this)), m(0) {} // expected-note {{in call to 'extract(s1)'}} in S()
8 constexpr S(int k) : n(k), m(extract(*this)) {} in S()
12 constexpr int extract(const S &s) { return s.n; } // expected-note {{read of object outside its lif… in extract()
14 constexpr S s1; // ok
16 constexpr S s1; // expected-error {{constant expression}} expected-note {{in call to 'S()'}} in f()
17 constexpr S s2(10); in f()
23 constexpr T() : arr() {} in T()
27 constexpr U(const int *p) : T(), another(), p(p) {} in U()
28 constexpr U(const U &u) : T(), another(), p(u.p) {} in U()
32 constexpr U u1(&u1.arr[2]);
34 constexpr int test_printing(int a, float b, _Complex int c, _Complex float d, in test_printing()
46 constexpr V() : arr{[255] = 42} {} in V()
47 constexpr V(const V &v) : arr{[255] = 42} {} in V()
50 constexpr V v;
51 constexpr int get(const int *p) { return *p; } // expected-note {{read of dereferenced one-past-the… in get()
52 constexpr int passLargeArray(V v) { return get(v.arr+256); } // expected-note {{in call to 'get(&v.… in passLargeArray()
56 constexpr Union(int n) : b(n) {} in Union()
57 constexpr Union(const Union &u) : b(u.b) {} in Union()
60 constexpr Union myUnion = 76;
62 constexpr int badness(Union u) { return u.a + u.b; } // expected-note {{read of member 'a' of union… in badness()
71 constexpr int MemPtr(int (MemPtrTest::*a), void (MemPtrTest::*b)(), int &c) { in MemPtr()
78 constexpr CharT get(const CharT *p) { return p[-1]; } // expected-note 5{{}} in get()
80 constexpr char c = get("test\0\\\"\t\a\b\234"); // \
82 constexpr char c8 = get(u8"test\0\\\"\t\a\b\234"); // \
84 constexpr char16_t c16 = get(u"test\0\\\"\t\a\b\234\u1234"); // \
86 constexpr char32_t c32 = get(U"test\0\\\"\t\a\b\234\u1234\U0010ffff"); // \
88 constexpr wchar_t wc = get(L"test\0\\\"\t\a\b\234\u1234\xffffffff"); // \
91 constexpr char32_t c32_err = get(U"\U00110000"); // expected-error {{invalid universal character}}
96 constexpr LabelDiffTy mulBy3(LabelDiffTy x) { return x * 3; } // expected-note {{subexpression}} in mulBy3()
102 constexpr bool test_bool_printing(bool b) { return 1 / !(2*b | !(2*b)); } // expected-note 2{{divis… in test_bool_printing()
103 constexpr bool test_bool_0 = test_bool_printing(false); // expected-error {{constant expr}} expecte…
104 constexpr bool test_bool_1 = test_bool_printing(true); // expected-error {{constant expr}} expected…