/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 {{without a user-provided default constructor}} 18 constexpr B b2 = B(); // ok 26 constexpr C c1; // expected-error {{without a user-provided default constructor}} 27 constexpr C c2 = C(); // ok 28 constexpr D d1; // expected-error {{without a user-provided default constructor}} 29 constexpr D d2 = D(); // ok with DR1452 35 constexpr Z() : V() { [all...] |
constexpr-printing.cpp | 4 constexpr int extract(const S &s); 7 constexpr S() : n(extract(*this)), m(0) {} // expected-note {{in call to 'extract(s1)'}} 8 constexpr S(int k) : n(k), m(extract(*this)) {} 12 constexpr int extract(const S &s) { return s.n; } // expected-note {{read of object outside its lifetime is not allowed in a constant expression}} 14 constexpr S s1; // ok 16 constexpr S s1; // expected-error {{constant expression}} expected-note {{in call to 'S()'}} 17 constexpr S s2(10); 23 constexpr T() : arr() {} 27 constexpr U(const int *p) : T(), another(), p(p) {} 28 constexpr U(const U &u) : T(), another(), p(u.p) { [all...] |
constexpr-strlen.cpp | 9 # 10 "SemaCXX/constexpr-strlen.cpp" 2 10 constexpr int n = __builtin_strlen("hello"); // ok 11 constexpr int m = strlen("hello"); // expected-error {{constant expression}} expected-note {{non-constexpr function 'strlen' cannot be used in a constant expression}}
|
cxx1y-initializer-aggregates.cpp | 5 constexpr U u1 = U(); 6 constexpr U u2 {}; 7 constexpr U u3 { 'x' }; 20 constexpr A a1 {}; 21 constexpr A a2 { 8 }; 22 constexpr A a3 { 1, 2, { 3 } }; 23 constexpr A a4 { 1, 2, { .d = 3.0 } }; 33 constexpr int f() { return n * 5; } 37 constexpr B b2 { 2 }; 55 constexpr B(int k) : d(1.23), k(k) { [all...] |
constexpr-factorial.cpp | 3 constexpr unsigned oddfac(unsigned n) { 6 constexpr unsigned k = oddfac(123);
|
/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-linux-glibc2.15-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/current/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...] |
/external/clang/test/Modules/Inputs/ |
redecl-add-after-load-decls.h | 3 extern constexpr int function(); 4 constexpr int test(bool b) { return b ? variable : function(); } 9 extern constexpr int function(); 12 constexpr int N_test(bool b) { return b ? N::variable : N::function(); } 16 constexpr int C_test(bool b) { return b ? C::variable : C::function(); } 21 static constexpr int function(); 24 constexpr int D_test(bool b) { return b ? D::variable : D::function(); }
|
/external/libcxx/test/std/experimental/utilities/tuple/tuple.apply/ |
constexpr_types.pass.cpp | 13 // constexpr support temporarily reverted due to bug: 19 // template <class F, class T> constexpr decltype(auto) apply(F &&, T &&) 21 // Testing constexpr evaluation 27 constexpr int f_int_0() { return 1; } 28 constexpr int f_int_1(int x) { return x; } 29 constexpr int f_int_2(int x, int y) { return (x + y); } 33 constexpr A_int_0() {} 34 constexpr int operator()() const { return 1; } 39 constexpr A_int_1() {} 40 constexpr int operator()(int x) const { return x; [all...] |
/external/clang/test/SemaTemplate/ |
instantiate-var-template.cpp | 4 template <typename T> constexpr T pi = T(3.14); 5 template <typename T> constexpr T tau = 2 * pi<T>; 6 constexpr double tau_double = tau<double>; 11 template<typename T> constexpr T var = 12345; 12 template<typename T> constexpr T f() { return var<T>; } 13 constexpr int k = f<int>(); 18 template<typename T> constexpr T a = 0; 19 template<typename T> constexpr T b = a<int>; 27 template<int> constexpr int a = 1; 28 template<typename T> constexpr T b = a<sizeof(sizeof(f(T())))>; // expected-error {{invalid application of 'sizeof' to an incompl (…) [all...] |
constexpr-instantiate.cpp | 5 template<typename T> static constexpr T get() { return T(); } 11 constexpr int j = A::get<int>(); 13 template<typename T> constexpr int consume(T); 17 template<typename T> constexpr int consume(T) { return 0; } 19 constexpr int l = consume(0); 21 constexpr int m = k; // expected-error {{constant expression}} expected-note {{initializer of 'k'}} 25 template<typename T> constexpr T f(T n) { return n; } 36 template<typename T> constexpr T f(T n) { return n; } 46 template<typename T> constexpr T f(T t) { return t; } 65 constexpr int m = S<int>::k; // o [all...] |
/art/runtime/ |
modifiers.h | 24 static constexpr uint32_t kAccPublic = 0x0001; // class, field, method, ic 25 static constexpr uint32_t kAccPrivate = 0x0002; // field, method, ic 26 static constexpr uint32_t kAccProtected = 0x0004; // field, method, ic 27 static constexpr uint32_t kAccStatic = 0x0008; // field, method, ic 28 static constexpr uint32_t kAccFinal = 0x0010; // class, field, method, ic 29 static constexpr uint32_t kAccSynchronized = 0x0020; // method (only allowed on natives) 30 static constexpr uint32_t kAccSuper = 0x0020; // class (not used in dex) 31 static constexpr uint32_t kAccVolatile = 0x0040; // field 32 static constexpr uint32_t kAccBridge = 0x0040; // method (1.5) 33 static constexpr uint32_t kAccTransient = 0x0080; // fiel [all...] |
/external/clang/test/Parser/ |
cxx11-type-specifier.cpp | 6 operator constexpr int(); // expected-error{{type name does not allow constexpr}} 12 (void) new constexpr int; // expected-error{{type name does not allow constexpr}} 13 } catch (constexpr int) { // expected-error{{type name does not allow constexpr}}
|
/art/runtime/mirror/ |
class_flags.h | 26 static constexpr uint32_t kClassFlagNormal = 0x00000000; 30 static constexpr uint32_t kClassFlagNoReferenceFields = 0x00000001; 33 static constexpr uint32_t kClassFlagString = 0x00000004; 36 static constexpr uint32_t kClassFlagObjectArray = 0x00000008; 39 static constexpr uint32_t kClassFlagClass = 0x00000010; 42 static constexpr uint32_t kClassFlagClassLoader = 0x00000020; 45 static constexpr uint32_t kClassFlagDexCache = 0x00000040; 48 static constexpr uint32_t kClassFlagSoftReference = 0x00000080; 51 static constexpr uint32_t kClassFlagWeakReference = 0x00000100; 54 static constexpr uint32_t kClassFlagFinalizerReference = 0x00000200 [all...] |
/prebuilts/ndk/current/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/ |
parse_numbers.h | 51 static constexpr bool valid{true}; 52 static constexpr unsigned value{0}; 58 static constexpr bool valid{true}; 59 static constexpr unsigned value{1}; 66 static constexpr bool valid{true}; 67 static constexpr unsigned value{2}; 74 static constexpr bool valid{true}; 75 static constexpr unsigned value{3}; 82 static constexpr bool valid{true}; 83 static constexpr unsigned value{4} [all...] |
enable_special_members.h | 89 { constexpr _Enable_default_constructor() noexcept = delete; }; 98 constexpr _Enable_copy_move() noexcept = default; 99 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete; 100 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default; 110 constexpr _Enable_copy_move() noexcept = default; 111 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = default; 112 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default; 122 constexpr _Enable_copy_move() noexcept = default; 123 constexpr _Enable_copy_move(_Enable_copy_move const&) noexcept = delete; 124 constexpr _Enable_copy_move(_Enable_copy_move&&) noexcept = default [all...] |
/system/extras/simpleperf/runtest/ |
one_function.cpp | 0 constexpr int LOOP_COUNT = 100000000;
|
/external/clang/test/CXX/expr/expr.const/ |
p2-0x.cpp | 7 // expression, function invocation substitution (7.1.5 [dcl.constexpr]) 8 // replaces each occurrence of this in a constexpr member function with a 20 // - an invocation of a function other than a constexpr constructor for a 21 // literal class or a constexpr function [ Note: Overload resolution (13.3) 25 int n : f(); // expected-error {{constant expression}} expected-note {{non-constexpr function 'f' cannot be used in a constant expression}} 28 constexpr NonConstexpr2(); // expected-note {{here}} 40 int n : NonConstexpr4().n; // expected-error {{constant expression}} expected-note {{non-constexpr constructor 'NonConstexpr4' cannot be used in a constant expression}} 43 // - an invocation of an undefined constexpr function or an undefined 44 // constexpr constructor; 46 constexpr UndefinedConstexpr() [all...] |
/art/runtime/base/ |
memory_tool.h | 35 constexpr bool kMemoryToolIsAvailable = true; 40 constexpr bool kMemoryToolIsAvailable = false; 45 constexpr bool kMemoryToolIsValgrind = false; 46 constexpr bool kMemoryToolDetectsLeaks = true; 47 constexpr bool kMemoryToolAddsRedzones = true; 48 constexpr size_t kMemoryToolStackGuardSizeScale = 2; 59 constexpr bool kMemoryToolIsAvailable = true; 60 constexpr bool kMemoryToolIsValgrind = true; 61 constexpr bool kMemoryToolDetectsLeaks = true; 62 constexpr bool kMemoryToolAddsRedzones = true [all...] |
/art/runtime/jdwp/ |
jdwp_priv.h | 32 static constexpr size_t kJDWPHeaderSizeOffset = 0U; 33 static constexpr size_t kJDWPHeaderIdOffset = 4U; 34 static constexpr size_t kJDWPHeaderFlagsOffset = 8U; 35 static constexpr size_t kJDWPHeaderErrorCodeOffset = 9U; 36 static constexpr size_t kJDWPHeaderCmdSetOffset = 9U; 37 static constexpr size_t kJDWPHeaderCmdOffset = 10U; 38 static constexpr size_t kJDWPHeaderLen = 11U; 39 static constexpr uint8_t kJDWPFlagReply = 0x80; 41 static constexpr const char kMagicHandshake[] = "JDWP-Handshake"; 42 static constexpr size_t kMagicHandshakeLen = sizeof(kMagicHandshake) - 1 [all...] |
/external/clang/test/PCH/ |
cxx11-constexpr.cpp | 10 constexpr B(char) {} 19 constexpr D(int n) : B('x'), k(2*n+1) {} 23 constexpr int value = 7; 26 constexpr T plus_seven(T other) { 33 constexpr int f(C c) { return 0; } // expected-error {{not a literal type}} 34 // expected-note@13 {{not an aggregate and has no constexpr constructors}} 35 constexpr B b; // expected-error {{constant expression}} expected-note {{non-constexpr}}
|
/external/clang/test/SemaObjCXX/ |
warn-missing-super.mm | 11 constexpr shared_ptr() {} 17 constexpr shared_ptr<int> dummy;
|
/external/compiler-rt/test/asan/TestCases/ |
initialization-constexpr.cc | 0 // Constexpr: 2 // We need to check that a global variable initialized with a constexpr 3 // constructor can be accessed during dynamic initialization (as a constexpr 7 // RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-constexpr-extra.cc --std=c++11 -o %t 9 // RUN: %clangxx_asan -O1 %s %p/Helpers/initialization-constexpr-extra.cc --std=c++11 -o %t 11 // RUN: %clangxx_asan -O2 %s %p/Helpers/initialization-constexpr-extra.cc --std=c++11 -o %t 13 // RUN: %clangxx_asan -O3 %s %p/Helpers/initialization-constexpr-extra.cc --std=c++11 -o %t 21 constexpr Integer(int x = 0) : value(x) {}
|