/external/compiler-rt/test/asan/TestCases/Helpers/ |
initialization-constexpr-extra.cc | 0 // Constexpr:
|
/external/clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/ |
p1.cpp | 11 constexpr int i1 = 0; 12 constexpr int f1() { return 0; } 14 constexpr static int mi1 = 0; 17 constexpr int s1::mi2 = 0; 21 constexpr extern int i2; // expected-error {{constexpr variable declaration must be a definition}} 23 constexpr notlit nl1; // expected-error {{constexpr variable cannot have non-literal type 'const notlit'}} 25 void f2(constexpr int i) {} // expected-error {{function parameter cannot be constexpr}} 42 class C2 {} constexpr; \/\/ expected-error {{class cannot be marked constexpr}} variable in typeref:class:C2 43 struct S2 {} constexpr; \/\/ expected-error {{struct cannot be marked constexpr}} variable in typeref:struct:S2 44 union U2 {} constexpr; \/\/ expected-error {{union cannot be marked constexpr}} variable in typeref:union:U2 45 enum E2 {} constexpr; \/\/ expected-error {{enum cannot be marked constexpr}} variable in typeref:enum:E2 [all...] |
p2.cpp | 3 // constexpr functions and constexpr constructors are implicitly inline. 5 constexpr S(int n); 6 constexpr int g(); 10 constexpr S::S(int n) : n(n) {} 12 constexpr S f(S s) { 16 constexpr int S::g() {
|
p9.cpp | 3 // A constexpr specifier used in an object declaration declares the object as 5 constexpr int a = 0; 9 constexpr int *b = &i; 12 constexpr int &c = i; 15 constexpr int (*d)(int) = 0; 18 // A variable declaration which uses the constexpr specifier shall have an 20 constexpr int ni1; // expected-error {{default initialization of an object of const type 'const int'}} 21 constexpr struct C { C(); } ni2; // expected-error {{cannot have non-literal type 'const struct C'}} expected-note 3{{has no constexpr constructors}} 22 constexpr double &ni3; // expected-error {{declaration of reference variable 'ni3' requires an initializer} [all...] |
p4.cpp | 12 struct NonLiteral { // expected-note 2{{no constexpr constructors}} 17 constexpr Literal() {} 22 // In the definition of a constexpr constructor, each of the parameter types 25 constexpr S(int, N::C) {} 26 constexpr S(int, NonLiteral, N::C) {} // expected-error {{constexpr constructor's 2nd parameter type 'NonLiteral' is not a literal type}} 27 constexpr S(int, NonLiteral = 42) {} // expected-error {{constexpr constructor's 2nd parameter type 'NonLiteral' is not a literal type}} 30 constexpr S() = default; 31 constexpr S(Literal) = delete [all...] |
p6.cpp | 17 constexpr Literal() {} 27 constexpr int ImplicitlyVirtual() const { return 0; } 30 constexpr int a = ImplicitVirtualFromDependentBase<S>().ImplicitlyVirtual(); // expected-error {{constant expression}} expected-note {{cannot evaluate virtual function call}} 31 constexpr int b = ImplicitVirtualFromDependentBase<T>().ImplicitlyVirtual(); // ok 32 constexpr int c = ImplicitVirtualFromDependentBase<S>().ImplicitVirtualFromDependentBase<S>::ImplicitlyVirtual(); 35 constexpr R F() const { return 0; } 37 constexpr int d = ConstexprMember<int>().F(); // ok 38 constexpr int e = ConstexprMember<NonLiteral>().F(); // expected-error {{constant expression}} expected-note {{non-literal type 'const NonLiteral' cannot be used in a constant expression}} 41 constexpr ConstexprCtor(P...) {} 43 constexpr ConstexprCtor<> f1() { return {}; } // o [all...] |
p8.cpp | 6 constexpr int f(); // expected-warning {{C++1y}} 7 constexpr int g() const; 8 constexpr int h(); // expected-warning {{C++1y}} 10 static constexpr int Sf(); 11 /*static*/ constexpr void *operator new(size_t) noexcept; 12 template<typename T> constexpr T tm(); // expected-warning {{C++1y}} 13 template<typename T> static constexpr T ts(); 28 constexpr int S::f() const { return 0; } 29 constexpr int S::g() { return 1; } // expected-warning {{C++1y}} 30 constexpr int S::h() { return 0; } // expected-warning {{C++1y} [all...] |
p3.cpp | 12 struct NonLiteral { // expected-note 3{{no constexpr constructors}} 17 constexpr Literal() {} 28 // The definition of a constexpr function shall satisfy the following 31 constexpr T(); 32 constexpr int f() const; // expected-error {{non-literal type 'T' cannot have constexpr members}} 35 virtual constexpr int ExplicitlyVirtual() const { return 0; } // expected-error {{virtual function cannot be constexpr}} 37 constexpr int ImplicitlyVirtual() const { return 0; } // expected-error {{virtual function cannot be constexpr}} [all...] |
p5.cpp | 2 // RUN: %clang_cc1 -fsyntax-only -triple x86_64-unknown-unknown -std=c++11 -fcxx-exceptions -Wno-invalid-constexpr %s -DNO_INVALID_CONSTEXPR 6 constexpr int f(void *) { return 0; } 7 constexpr int f(...) { return 1; } 8 constexpr int g1() { return f(0); } 9 constexpr int g2(int n) { return f(n); } 10 constexpr int g3(int n) { return f(n*0); } 13 constexpr int c = 5; 14 constexpr int h() { return c; } 16 constexpr int c = 0; 17 constexpr int g4() { return N::h(); [all...] |
/external/clang/test/CXX/special/class.copy/ |
p13-0x.cpp | 4 // constexpr constructor, the implicitly-defined constructor is constexpr. 6 constexpr Constexpr1() : n(0) {} 9 constexpr Constexpr1 c1a = Constexpr1(Constexpr1()); // ok 10 constexpr Constexpr1 c1b = Constexpr1(Constexpr1(c1a)); // ok 14 constexpr Constexpr2() = default; 15 constexpr Constexpr2(const Constexpr2 &o) : ce1(o.ce1) {} 19 constexpr Constexpr2 c2a = Constexpr2(Constexpr2()); // ok 20 constexpr Constexpr2 c2b = Constexpr2(Constexpr2(c2a)); // ok 24 // all special constructors are constexpr, move ctor calls ce2's copy cto [all...] |
/external/clang/test/Modules/Inputs/ |
redecl-add-after-load-top.h | 4 static constexpr int function();
|
redecl-add-after-load.h | 3 extern constexpr int function() { return 0; } 8 extern constexpr int function() { return 0; } 14 constexpr int C::function() { return 0; } 19 static constexpr int function(); 23 constexpr int D::function() { return 0; }
|
/external/clang/test/CXX/special/class.ctor/ |
p6-0x.cpp | 3 // Implicitly-defined default constructors are constexpr if the implicit 12 constexpr NonConstexpr1 nc1 = NonConstexpr1(); // ok, does not call constructor 13 constexpr NonConstexpr2 nc2 = NonConstexpr2(); // ok, does not call constructor 14 constexpr NonConstexpr2a nc2a = NonConstexpr2a(); // ok, does not call constructor 15 constexpr int nc2_a = NonConstexpr2().nl.a; // ok 16 constexpr int nc2a_a = NonConstexpr2a().a; // ok 18 friend constexpr NonConstexpr1::NonConstexpr1(); // expected-error {{follows non-constexpr declaration}} 19 friend constexpr NonConstexpr2::NonConstexpr2(); // expected-error {{follows non-constexpr declaration} [all...] |
/external/clang/test/CXX/special/class.inhctor/ |
p2.cpp | 9 // - absence or presence of constexpr 12 constexpr A(X<1>) {} 14 explicit constexpr A(X<3>) {} // expected-note 2{{here}} 19 constexpr A a0c { X<0>{} }; // expected-error {{must be initialized by a constant expression}} expected-note {{non-constexpr}} 20 constexpr A a0ic = { X<0>{} }; // expected-error {{must be initialized by a constant expression}} expected-note {{non-constexpr}} 24 constexpr A a1c { X<1>{} }; 25 constexpr A a1ic = { X<1>{} }; 29 constexpr A a2c { X<2>{} }; // expected-error {{must be initialized by a constant expression}} expected-note (…) [all...] |
p8.cpp | 4 constexpr A(const int&) : rval(false) {} 5 constexpr A(const int&&) : rval(true) {} 12 constexpr int k = 0; 13 constexpr A a0{0}; 14 constexpr A a1{k}; 15 constexpr B b0{0}; 18 constexpr B b1{k}; 23 template<typename T> constexpr C(T t) : v(t) {} 32 template<typename T> constexpr D::D(T t) : C(t) {} // expected-error {{definition of implicitly declared function}}
|
/external/clang/test/CXX/class/class.static/class.static.data/ |
p3.cpp | 3 struct NonLit { // expected-note 3{{no constexpr constructors}} 8 static constexpr int a = 0; 9 static constexpr int b; // expected-error {{declaration of constexpr static data member 'b' requires an initializer}} 11 static constexpr int c = 0; 15 static constexpr double e = 0.0; // ok 16 static const double f = 0.0; // expected-error {{requires 'constexpr' specifier}} expected-note {{add 'constexpr'}} 17 static char *const g = 0; // expected-error {{requires 'constexpr' specifier}} 21 constexpr int S::a [all...] |
/art/runtime/ |
modifiers.h | 22 static constexpr uint32_t kAccPublic = 0x0001; // class, field, method, ic 23 static constexpr uint32_t kAccPrivate = 0x0002; // field, method, ic 24 static constexpr uint32_t kAccProtected = 0x0004; // field, method, ic 25 static constexpr uint32_t kAccStatic = 0x0008; // field, method, ic 26 static constexpr uint32_t kAccFinal = 0x0010; // class, field, method, ic 27 static constexpr uint32_t kAccSynchronized = 0x0020; // method (only allowed on natives) 28 static constexpr uint32_t kAccSuper = 0x0020; // class (not used in dex) 29 static constexpr uint32_t kAccVolatile = 0x0040; // field 30 static constexpr uint32_t kAccBridge = 0x0040; // method (1.5) 31 static constexpr uint32_t kAccTransient = 0x0080; // fiel [all...] |
globals.h | 31 static constexpr size_t KB = 1024; 32 static constexpr size_t MB = KB * KB; 33 static constexpr size_t GB = KB * KB * KB; 36 static constexpr size_t kWordSize = sizeof(word); 37 static constexpr size_t kPointerSize = sizeof(void*); 39 static constexpr size_t kBitsPerByte = 8; 40 static constexpr size_t kBitsPerByteLog2 = 3; 41 static constexpr int kBitsPerWord = kWordSize * kBitsPerByte; 42 static constexpr size_t kWordHighBitMask = static_cast<size_t>(1) << (kBitsPerWord - 1); 45 static constexpr size_t kStackAlignment = 16 [all...] |
/external/clang/test/CXX/basic/basic.types/ |
p10.cpp | 9 constexpr void f() {} 15 constexpr int f1(double) { return 0; } 19 constexpr int f2(S &) { return 0; } 24 static constexpr BeingDefined& t = beingdefined; 34 constexpr Incomplete incomplete = {}; // expected-error {{constexpr variable cannot have non-literal type 'const Incomplete'}} expected-note {{incomplete type 'const Incomplete' is not a literal type}} 35 constexpr Incomplete incomplete2[] = {}; // expected-error {{constexpr variable cannot have non-literal type 'Incomplete const[]'}} expected-note {{incomplete type 'Incomplete const[]' is not a literal type}} 36 constexpr ClassTemp<int> classtemplate = {}; 37 constexpr ClassTemp<int> classtemplate2[] = {} [all...] |
/external/clang/test/CXX/dcl.dcl/ |
p4-0x.cpp | 4 constexpr S(bool b) : b(b) {} 5 constexpr explicit operator bool() const { return b; } 9 constexpr operator int() const { return 1; } 12 constexpr operator int() const { return 1; } // expected-note {{candidate}} 13 constexpr operator long() const { return 0; } // expected-note {{candidate}}
|
/external/clang/test/SemaCXX/ |
constexpr-value-init.cpp | 4 constexpr A() : a(b + 1), b(a + 1) {} // expected-note {{outside its lifetime}} 12 constexpr A a; // ok, zero initialization precedes static initialization 14 constexpr A a; // expected-error {{constant expression}} expected-note {{in call to 'A()'}} 17 constexpr B b1; // expected-error {{requires a user-provided default constructor}} 18 constexpr B b2 = B(); // ok 26 constexpr C c1; // expected-error {{requires a user-provided default constructor}} 27 constexpr C c2 = C(); // ok 28 constexpr D d1; // expected-error {{requires a user-provided default constructor}} 29 constexpr D d2 = D(); // ok with DR1452 35 constexpr Z() : V() { [all...] |
/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.8/x86_64-linux/include/c++/4.8/ext/ |
cmath | 53 static constexpr _RealType __pi = 3.1415926535897932384626433832795029L; 55 static constexpr _RealType __pi_half = 1.5707963267948966192313216916397514L; 57 static constexpr _RealType __pi_third = 1.0471975511965977461542144610931676L; 59 static constexpr _RealType __pi_quarter = 0.7853981633974483096156608458198757L; 61 static constexpr _RealType __root_pi_div_2 = 1.2533141373155002512078826424055226L; 63 static constexpr _RealType __one_div_pi = 0.3183098861837906715377675267450287L; 65 static constexpr _RealType __two_div_pi = 0.6366197723675813430755350534900574L; 67 static constexpr _RealType __two_div_root_pi = 1.1283791670955125738961589031215452L; 70 static constexpr _RealType __e = 2.7182818284590452353602874713526625L; 72 static constexpr _RealType __one_div_e = 0.36787944117144232159552377016146087L [all...] |
/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/include/c++/4.8.3/ext/ |
cmath | 53 static constexpr _RealType __pi = 3.1415926535897932384626433832795029L; 55 static constexpr _RealType __pi_half = 1.5707963267948966192313216916397514L; 57 static constexpr _RealType __pi_third = 1.0471975511965977461542144610931676L; 59 static constexpr _RealType __pi_quarter = 0.7853981633974483096156608458198757L; 61 static constexpr _RealType __root_pi_div_2 = 1.2533141373155002512078826424055226L; 63 static constexpr _RealType __one_div_pi = 0.3183098861837906715377675267450287L; 65 static constexpr _RealType __two_div_pi = 0.6366197723675813430755350534900574L; 67 static constexpr _RealType __two_div_root_pi = 1.1283791670955125738961589031215452L; 70 static constexpr _RealType __e = 2.7182818284590452353602874713526625L; 72 static constexpr _RealType __one_div_e = 0.36787944117144232159552377016146087L [all...] |
/prebuilts/ndk/9/sources/cxx-stl/gnu-libstdc++/4.8/include/ext/ |
cmath | 53 static constexpr _RealType __pi = 3.1415926535897932384626433832795029L; 55 static constexpr _RealType __pi_half = 1.5707963267948966192313216916397514L; 57 static constexpr _RealType __pi_third = 1.0471975511965977461542144610931676L; 59 static constexpr _RealType __pi_quarter = 0.7853981633974483096156608458198757L; 61 static constexpr _RealType __root_pi_div_2 = 1.2533141373155002512078826424055226L; 63 static constexpr _RealType __one_div_pi = 0.3183098861837906715377675267450287L; 65 static constexpr _RealType __two_div_pi = 0.6366197723675813430755350534900574L; 67 static constexpr _RealType __two_div_root_pi = 1.1283791670955125738961589031215452L; 70 static constexpr _RealType __e = 2.7182818284590452353602874713526625L; 72 static constexpr _RealType __one_div_e = 0.36787944117144232159552377016146087L [all...] |
/prebuilts/ndk/9/sources/cxx-stl/gnu-libstdc++/4.9/include/ext/ |
cmath | 53 static constexpr _RealType __pi = 3.1415926535897932384626433832795029L; 55 static constexpr _RealType __pi_half = 1.5707963267948966192313216916397514L; 57 static constexpr _RealType __pi_third = 1.0471975511965977461542144610931676L; 59 static constexpr _RealType __pi_quarter = 0.7853981633974483096156608458198757L; 61 static constexpr _RealType __root_pi_div_2 = 1.2533141373155002512078826424055226L; 63 static constexpr _RealType __one_div_pi = 0.3183098861837906715377675267450287L; 65 static constexpr _RealType __two_div_pi = 0.6366197723675813430755350534900574L; 67 static constexpr _RealType __two_div_root_pi = 1.1283791670955125738961589031215452L; 70 static constexpr _RealType __e = 2.7182818284590452353602874713526625L; 72 static constexpr _RealType __one_div_e = 0.36787944117144232159552377016146087L [all...] |