/external/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/ |
p7-1y.cpp | 21 decltype(auto) x3d = i; 22 using Int = decltype(x3a); 23 using Int = decltype(x3d); 26 decltype(auto) x4d = (i); 27 using Int = decltype(x4a); 28 using IntLRef = decltype(x4d); 31 decltype(auto) x5d = f(); 32 using Int = decltype(x5a); 33 using IntRRef = decltype(x5d); 36 decltype(auto) x6d = { 1, 2 }; // expected-error {{cannot deduce 'decltype(auto)' from initializer list} [all...] |
p3-1y.cpp | 6 decltype(auto) a = a; // expected-error{{variable 'a' declared with 'auto' type cannot appear in its own initializer}} 7 if (decltype(auto) b = b) {} // expected-error {{variable 'b' declared with 'auto' type cannot appear in its own initializer}} 8 decltype(auto) c = ({ decltype(auto) d = c; 0; }); // expected-error {{variable 'c' declared with 'auto' type cannot appear in its own initializer}} 12 decltype(auto) a; // expected-error{{declaration of variable 'a' with type 'decltype(auto)' requires an initializer}} 14 decltype(auto) *b; // expected-error{{cannot form pointer to 'decltype(auto)'}} expected-error{{declaration of variable 'b' with type 'decltype(auto) *' requires an initializer}} 16 if (decltype(auto) b) {} // expected-error {{must have an initializer} [all...] |
/external/clang/test/CXX/expr/expr.prim/expr.prim.general/ |
p8-0x.cpp | 23 operator decltype(outer::middle::inner()) (); 24 operator decltype(outer::middle())::inner2 (); 25 operator decltype(outer())::middle::inner3 (); 26 str(int (decltype(outer::middle::inner())::*n)(), 27 int (decltype(outer::middle())::inner::*o)(), 28 int (decltype(outer())::middle::inner::*p)()); 31 decltype(outer::middle::inner()) a; 33 a.decltype(outer::middle())::mfunc(); // expected-error{{'PR10127::outer::middle::mfunc' is not a member of class 'decltype(outer::middle::inner())'}} 34 a.decltype(outer::middle::inner())::func() [all...] |
/external/clang/test/CodeGenCXX/ |
debug-info-nullptr.cpp | 4 decltype(nullptr) t = 0; 7 // CHECK: [ DW_TAG_unspecified_type ] [decltype(nullptr)]
|
/external/clang/test/Parser/ |
bracket-crash.cpp | 3 decltype(; 9 decltype(
|
/external/clang/test/CXX/special/class.dtor/ |
p10-0x.cpp | 8 x->~decltype(T())(); 9 x->~decltype(*x)(); // expected-error{{the type of object expression ('const int') does not match the type being destroyed ('decltype(*x)' (aka 'const int &')) in pseudo-destructor expression}} \ 11 x->~decltype(int())(); // expected-error{{no member named '~int' in 'A'}} 13 y->~decltype(*y)(); // expected-error{{destructor type 'decltype(*y)' (aka 'const A &') in object destruction expression does not match the type 'const A' of the object being destroyed}} 14 y->~decltype(T())(); // expected-error{{destructor type 'decltype(T())' in object destruction expression does not match the type 'const A' of the object being destroyed}} 15 y->~decltype(A())(); 20 x->~decltype(A())() [all...] |
/external/clang/test/CXX/expr/expr.post/expr.type.conv/ |
p1-0x.cpp | 10 decltype(foo())(); 11 f = (decltype(foo()))5; 12 return decltype(3)(5);
|
/external/clang/test/SemaCXX/ |
decltype-crash.cpp | 6 decltype(a()) c; // expected-warning {{'decltype' is a keyword in C++11}} expected-error {{use of undeclared identifier 'decltype'}}
|
decltype.cpp | 6 decltype(0, f0()) i = 0; 24 auto call(F&& fn) -> decltype(fn(T())) { 29 auto then(F&& fn) -> decltype(call(fn)) 42 A(decltype(nullptr) param); 47 template<typename T> auto f(T t) -> decltype(S<int>(t)) { 48 using U = decltype(S<int>(t)); 54 B(decltype(undeclared)); // expected-error {{undeclared identifier}} 57 C(decltype(undeclared; // expected-error {{undeclared identifier}} \ 64 static decltype(T{}, U{}) &f(); 72 decltype(f()) *a; // ok, function cal [all...] |
/external/libcxx/test/utilities/allocator.adaptor/allocator.adaptor.types/ |
allocator_pointers.pass.cpp | 40 static_assert(std::is_same<bool, decltype( vp == vp)>::value, ""); 41 static_assert(std::is_same<bool, decltype( vp != vp)>::value, ""); 42 static_assert(std::is_same<bool, decltype( vp > vp)>::value, ""); 43 static_assert(std::is_same<bool, decltype( vp >= vp)>::value, ""); 44 static_assert(std::is_same<bool, decltype( vp < vp)>::value, ""); 45 static_assert(std::is_same<bool, decltype( vp <= vp)>::value, ""); 47 static_assert(std::is_same<bool, decltype( vp == cvp)>::value, ""); 48 static_assert(std::is_same<bool, decltype(cvp == vp)>::value, ""); 49 static_assert(std::is_same<bool, decltype( vp != cvp)>::value, ""); 50 static_assert(std::is_same<bool, decltype(cvp != vp)>::value, "") [all...] |
/external/libcxx/test/utilities/memory/default.allocator/ |
allocator_pointers.pass.cpp | 40 static_assert(std::is_same<bool, decltype( vp == vp)>::value, ""); 41 static_assert(std::is_same<bool, decltype( vp != vp)>::value, ""); 42 static_assert(std::is_same<bool, decltype( vp > vp)>::value, ""); 43 static_assert(std::is_same<bool, decltype( vp >= vp)>::value, ""); 44 static_assert(std::is_same<bool, decltype( vp < vp)>::value, ""); 45 static_assert(std::is_same<bool, decltype( vp <= vp)>::value, ""); 47 static_assert(std::is_same<bool, decltype( vp == cvp)>::value, ""); 48 static_assert(std::is_same<bool, decltype(cvp == vp)>::value, ""); 49 static_assert(std::is_same<bool, decltype( vp != cvp)>::value, ""); 50 static_assert(std::is_same<bool, decltype(cvp != vp)>::value, "") [all...] |
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/allocator.adaptor/allocator.adaptor.types/ |
allocator_pointers.pass.cpp | 40 static_assert(std::is_same<bool, decltype( vp == vp)>::value, ""); 41 static_assert(std::is_same<bool, decltype( vp != vp)>::value, ""); 42 static_assert(std::is_same<bool, decltype( vp > vp)>::value, ""); 43 static_assert(std::is_same<bool, decltype( vp >= vp)>::value, ""); 44 static_assert(std::is_same<bool, decltype( vp < vp)>::value, ""); 45 static_assert(std::is_same<bool, decltype( vp <= vp)>::value, ""); 47 static_assert(std::is_same<bool, decltype( vp == cvp)>::value, ""); 48 static_assert(std::is_same<bool, decltype(cvp == vp)>::value, ""); 49 static_assert(std::is_same<bool, decltype( vp != cvp)>::value, ""); 50 static_assert(std::is_same<bool, decltype(cvp != vp)>::value, "") [all...] |
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/utilities/memory/default.allocator/ |
allocator_pointers.pass.cpp | 40 static_assert(std::is_same<bool, decltype( vp == vp)>::value, ""); 41 static_assert(std::is_same<bool, decltype( vp != vp)>::value, ""); 42 static_assert(std::is_same<bool, decltype( vp > vp)>::value, ""); 43 static_assert(std::is_same<bool, decltype( vp >= vp)>::value, ""); 44 static_assert(std::is_same<bool, decltype( vp < vp)>::value, ""); 45 static_assert(std::is_same<bool, decltype( vp <= vp)>::value, ""); 47 static_assert(std::is_same<bool, decltype( vp == cvp)>::value, ""); 48 static_assert(std::is_same<bool, decltype(cvp == vp)>::value, ""); 49 static_assert(std::is_same<bool, decltype( vp != cvp)>::value, ""); 50 static_assert(std::is_same<bool, decltype(cvp != vp)>::value, "") [all...] |
/external/libcxx/test/depr/depr.c.headers/ |
math_h.disabled.cpp | 20 static_assert((std::is_same<decltype(acos((double)0)), double>::value), ""); 21 static_assert((std::is_same<decltype(acosf(0)), float>::value), ""); 22 static_assert((std::is_same<decltype(acosl(0)), long double>::value), ""); 28 static_assert((std::is_same<decltype(asin((double)0)), double>::value), ""); 29 static_assert((std::is_same<decltype(asinf(0)), float>::value), ""); 30 static_assert((std::is_same<decltype(asinl(0)), long double>::value), ""); 36 static_assert((std::is_same<decltype(atan((double)0)), double>::value), ""); 37 static_assert((std::is_same<decltype(atanf(0)), float>::value), ""); 38 static_assert((std::is_same<decltype(atanl(0)), long double>::value), ""); 44 static_assert((std::is_same<decltype(atan2((double)0, (double)0)), double>::value), "") [all...] |
stdio_h.pass.cpp | 90 static_assert((std::is_same<decltype(remove("")), int>::value), ""); 91 static_assert((std::is_same<decltype(rename("","")), int>::value), ""); 92 static_assert((std::is_same<decltype(tmpfile()), FILE*>::value), ""); 93 static_assert((std::is_same<decltype(tmpnam(cp)), char*>::value), ""); 94 static_assert((std::is_same<decltype(fclose(fp)), int>::value), ""); 95 static_assert((std::is_same<decltype(fflush(fp)), int>::value), ""); 96 static_assert((std::is_same<decltype(fopen("", "")), FILE*>::value), ""); 97 static_assert((std::is_same<decltype(freopen("", "", fp)), FILE*>::value), ""); 98 static_assert((std::is_same<decltype(setbuf(fp,cp)), void>::value), ""); 99 static_assert((std::is_same<decltype(vfprintf(fp,"",va)), int>::value), "") [all...] |
wchar_h.pass.cpp | 45 static_assert((std::is_same<decltype(fwprintf(fp, L"")), int>::value), ""); 46 static_assert((std::is_same<decltype(fwscanf(fp, L"")), int>::value), ""); 47 static_assert((std::is_same<decltype(swprintf(ws, s, L"")), int>::value), ""); 48 static_assert((std::is_same<decltype(swscanf(L"", L"")), int>::value), ""); 49 static_assert((std::is_same<decltype(vfwprintf(fp, L"", va)), int>::value), ""); 50 static_assert((std::is_same<decltype(vfwscanf(fp, L"", va)), int>::value), ""); 51 static_assert((std::is_same<decltype(vswprintf(ws, s, L"", va)), int>::value), ""); 52 static_assert((std::is_same<decltype(vswscanf(L"", L"", va)), int>::value), ""); 53 static_assert((std::is_same<decltype(vwprintf(L"", va)), int>::value), ""); 54 static_assert((std::is_same<decltype(vwscanf(L"", va)), int>::value), "") [all...] |
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/depr/depr.c.headers/ |
math_h.pass.cpp | 20 static_assert((std::is_same<decltype(acos((double)0)), double>::value), ""); 21 static_assert((std::is_same<decltype(acosf(0)), float>::value), ""); 22 static_assert((std::is_same<decltype(acosl(0)), long double>::value), ""); 28 static_assert((std::is_same<decltype(asin((double)0)), double>::value), ""); 29 static_assert((std::is_same<decltype(asinf(0)), float>::value), ""); 30 static_assert((std::is_same<decltype(asinl(0)), long double>::value), ""); 36 static_assert((std::is_same<decltype(atan((double)0)), double>::value), ""); 37 static_assert((std::is_same<decltype(atanf(0)), float>::value), ""); 38 static_assert((std::is_same<decltype(atanl(0)), long double>::value), ""); 44 static_assert((std::is_same<decltype(atan2((double)0, (double)0)), double>::value), "") [all...] |
stdio_h.pass.cpp | 90 static_assert((std::is_same<decltype(remove("")), int>::value), ""); 91 static_assert((std::is_same<decltype(rename("","")), int>::value), ""); 92 static_assert((std::is_same<decltype(tmpfile()), FILE*>::value), ""); 93 static_assert((std::is_same<decltype(tmpnam(cp)), char*>::value), ""); 94 static_assert((std::is_same<decltype(fclose(fp)), int>::value), ""); 95 static_assert((std::is_same<decltype(fflush(fp)), int>::value), ""); 96 static_assert((std::is_same<decltype(fopen("", "")), FILE*>::value), ""); 97 static_assert((std::is_same<decltype(freopen("", "", fp)), FILE*>::value), ""); 98 static_assert((std::is_same<decltype(setbuf(fp,cp)), void>::value), ""); 99 static_assert((std::is_same<decltype(vfprintf(fp,"",va)), int>::value), "") [all...] |
wchar_h.pass.cpp | 45 static_assert((std::is_same<decltype(fwprintf(fp, L"")), int>::value), ""); 46 static_assert((std::is_same<decltype(fwscanf(fp, L"")), int>::value), ""); 47 static_assert((std::is_same<decltype(swprintf(ws, s, L"")), int>::value), ""); 48 static_assert((std::is_same<decltype(swscanf(L"", L"")), int>::value), ""); 49 static_assert((std::is_same<decltype(vfwprintf(fp, L"", va)), int>::value), ""); 50 static_assert((std::is_same<decltype(vfwscanf(fp, L"", va)), int>::value), ""); 51 static_assert((std::is_same<decltype(vswprintf(ws, s, L"", va)), int>::value), ""); 52 static_assert((std::is_same<decltype(vswscanf(L"", L"", va)), int>::value), ""); 53 static_assert((std::is_same<decltype(vwprintf(L"", va)), int>::value), ""); 54 static_assert((std::is_same<decltype(vwscanf(L"", va)), int>::value), "") [all...] |
/external/clang/test/CXX/expr/expr.prim/expr.prim.lambda/ |
p18.cpp | 21 static_assert(is_same<decltype(((r))), float const&>::value, 23 static_assert(is_same<decltype(x), float>::value, "should be float"); 24 static_assert(is_same<decltype((x)), const float&>::value, 26 static_assert(is_same<decltype(r), float&>::value, "should be float&"); 27 static_assert(is_same<decltype(ir), int&>::value, "should be int&"); 28 static_assert(is_same<decltype((ir)), int&>::value, "should be int&"); 29 static_assert(is_same<decltype(irc), const int&>::value, 31 static_assert(is_same<decltype((irc)), const int&>::value, 37 static_assert(is_same<decltype(x), float>::value, "should be float"); 38 static_assert(is_same<decltype((x)), float&>::value, [all...] |
/external/clang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.simple/ |
p5-cxx0x.cpp | 8 template<class T> auto f(T) -> decltype(i(h<T>())); // #1 13 template<class T> auto q(T) -> decltype((h<T>())); 37 decltype(pd()) s; // ok 38 decltype(pd())::n n; // ok 39 decltype(dd()) *p = new decltype(dd()); // ok 43 // Two errors here: one for the decltype, one for the variable. 44 decltype( 47 decltype(dd(), // expected-error {{deleted function}} 49 decltype(a() [all...] |
/external/libcxx/test/numerics/c.math/ |
cmath.disabled.cpp | 26 static_assert((std::is_same<decltype(std::abs((float)0)), float>::value), ""); 27 static_assert((std::is_same<decltype(std::abs((double)0)), double>::value), ""); 28 static_assert((std::is_same<decltype(std::abs((long double)0)), long double>::value), ""); 34 static_assert((std::is_same<decltype(std::acos((float)0)), float>::value), ""); 35 static_assert((std::is_same<decltype(std::acos((bool)0)), double>::value), ""); 36 static_assert((std::is_same<decltype(std::acos((unsigned short)0)), double>::value), ""); 37 static_assert((std::is_same<decltype(std::acos((int)0)), double>::value), ""); 38 static_assert((std::is_same<decltype(std::acos((unsigned int)0)), double>::value), ""); 39 static_assert((std::is_same<decltype(std::acos((long)0)), double>::value), ""); 40 static_assert((std::is_same<decltype(std::acos((unsigned long)0)), double>::value), "") [all...] |
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/numerics/c.math/ |
cmath.pass.cpp | 26 static_assert((std::is_same<decltype(std::abs((float)0)), float>::value), ""); 27 static_assert((std::is_same<decltype(std::abs((double)0)), double>::value), ""); 28 static_assert((std::is_same<decltype(std::abs((long double)0)), long double>::value), ""); 34 static_assert((std::is_same<decltype(std::acos((float)0)), float>::value), ""); 35 static_assert((std::is_same<decltype(std::acos((bool)0)), double>::value), ""); 36 static_assert((std::is_same<decltype(std::acos((unsigned short)0)), double>::value), ""); 37 static_assert((std::is_same<decltype(std::acos((int)0)), double>::value), ""); 38 static_assert((std::is_same<decltype(std::acos((unsigned int)0)), double>::value), ""); 39 static_assert((std::is_same<decltype(std::acos((long)0)), double>::value), ""); 40 static_assert((std::is_same<decltype(std::acos((unsigned long)0)), double>::value), "") [all...] |
/external/libcxx/test/language.support/support.runtime/ |
cstdlib.pass.cpp | 42 static_assert((std::is_same<decltype(std::atof("")), double>::value), ""); 43 static_assert((std::is_same<decltype(std::atoi("")), int>::value), ""); 44 static_assert((std::is_same<decltype(std::atol("")), long>::value), ""); 45 static_assert((std::is_same<decltype(std::atoll("")), long long>::value), ""); 46 static_assert((std::is_same<decltype(std::getenv("")), char*>::value), ""); 47 static_assert((std::is_same<decltype(std::strtod("", endptr)), double>::value), ""); 48 static_assert((std::is_same<decltype(std::strtof("", endptr)), float>::value), ""); 49 static_assert((std::is_same<decltype(std::strtold("", endptr)), long double>::value), ""); 50 static_assert((std::is_same<decltype(std::strtol("", endptr,0)), long>::value), ""); 51 static_assert((std::is_same<decltype(std::strtoll("", endptr,0)), long long>::value), "") [all...] |
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/language.support/support.runtime/ |
cstdlib.pass.cpp | 42 static_assert((std::is_same<decltype(std::atof("")), double>::value), ""); 43 static_assert((std::is_same<decltype(std::atoi("")), int>::value), ""); 44 static_assert((std::is_same<decltype(std::atol("")), long>::value), ""); 45 static_assert((std::is_same<decltype(std::atoll("")), long long>::value), ""); 46 static_assert((std::is_same<decltype(std::getenv("")), char*>::value), ""); 47 static_assert((std::is_same<decltype(std::strtod("", endptr)), double>::value), ""); 48 static_assert((std::is_same<decltype(std::strtof("", endptr)), float>::value), ""); 49 static_assert((std::is_same<decltype(std::strtold("", endptr)), long double>::value), ""); 50 static_assert((std::is_same<decltype(std::strtol("", endptr,0)), long>::value), ""); 51 static_assert((std::is_same<decltype(std::strtoll("", endptr,0)), long long>::value), "") [all...] |