/external/clang/test/CXX/expr/expr.unary/expr.unary.noexcept/ |
ser.h | 1 // Serialization testing helper for noexcept, included by cg.cpp. 4 return noexcept(0); 7 return noexcept(throw 0);
|
cg.cpp | 15 b = noexcept(0); 17 b = noexcept(throw 0); 23 D(), noexcept(E());
|
sema.cpp | 3 #define P(e) static_assert(noexcept(e), "expected nothrow") 4 #define N(e) static_assert(!noexcept(e), "expected throw") 5 #define B(b, e) static_assert(b == noexcept(e), "expectation failed") 23 void noexcept_true() noexcept; 24 void noexcept_false() noexcept(false); 161 template <class T> void f(T&&) noexcept; 178 template <class T> T&& f2() noexcept;
|
/external/clang/test/CXX/except/except.spec/ |
p1.cpp | 25 // Simple parser tests, noexcept specification. 29 void f1() noexcept { } 30 void f2() noexcept (true) { } function in namespace:noex 31 void f3() noexcept (false) { } function in namespace:noex 32 void f4() noexcept (1 < 2) { } 35 void foo() noexcept { } 36 void bar() noexcept (true) { } function in class:noex::CA1 39 void (*fptr1)() noexcept; member in namespace:noex 40 void (*fptr2)() noexcept (true); 46 void f() throw(int) noexcept { } // expected-error {{cannot have both} 68 void g(T x) noexcept((sizeof(T) == sizeof(int)) || noexcept(f(x))) { } function in namespace:noexcept_unevaluated [all...] |
p3.cpp | 44 // noexcept is compatible with itself 45 extern void (*r10)() noexcept; 46 extern void (*r10)() noexcept; 48 // noexcept(true) is compatible with noexcept 49 extern void (*r11)() noexcept; 50 extern void (*r11)() noexcept(true); 52 // noexcept(false) isn't 53 extern void (*r12)() noexcept; // expected-note {{previous declaration}} 54 extern void (*r12)() noexcept(false); // expected-error {{does not match} [all...] |
p15.cpp | 3 // Deallocation functions are implicitly noexcept. 12 void operator delete(void*) noexcept; 13 void operator delete[](void*) noexcept; 17 void operator delete(void*, float) noexcept; 20 void operator delete[](void*, float) noexcept; 24 void operator delete(void*, double) noexcept; // expected-error {{does not match}}
|
p2-places.cpp | 46 void f() noexcept(false); 48 void (*fp)() noexcept(false); 50 void g(void pfa() noexcept(false)); 52 typedef int (*pf)() noexcept(false); // expected-error {{specifications are not allowed in typedefs}} typedef in namespace:noex 54 void (*h())() noexcept(false); 56 void (*i() noexcept(false))(void (*)() noexcept(true)) noexcept(false); 58 void (**k)(void pfa() noexcept(false)); // no-error 60 void (**j)() noexcept(false); // expected-error {{not allowed beyond a single} [all...] |
p5-virtual.cpp | 35 virtual void f7() noexcept; member in struct:Base 36 virtual void f8() noexcept; member in struct:Base 37 virtual void f9() noexcept(false); 38 virtual void f10() noexcept(false); 41 virtual void f12() noexcept; member in struct:Base 42 virtual void f13() noexcept(false); 54 virtual void g6() noexcept; // expected-note {{overridden virtual function is here}} member in struct:Base 55 virtual void g7() noexcept; // expected-note {{overridden virtual function is here}} member in struct:Base 57 virtual void g8() noexcept; // expected-note {{overridden virtual function is here}} member in struct:Base 71 virtual void f7() noexcept; member in struct:Derived 76 virtual void f11() noexcept; member in struct:Derived 81 virtual void f15() noexcept; member in struct:Derived [all...] |
template.cpp | 6 template <int N> void f2() noexcept(N > 1); 11 void (*t3)() noexcept = &f2<2>; // no-error 12 void (*t4)() noexcept = &f2<0>; // expected-error {{not superset}}
|
canonical.cpp | 8 template <class _Tp> _Tp&& declval() noexcept; member in namespace:std 13 static const bool value = noexcept(_Tp(declval<_Args>()...)); 24 noexcept(__is_nothrow_constructible<allocator_type>::value); 32 noexcept(__is_nothrow_constructible<_Compare>::value); 47 basic_string<T, _Traits, _Allocator>::basic_string() noexcept(__is_nothrow_constructible<allocator_type>::value) {} function in namespace:std 51 noexcept(__is_nothrow_constructible<_Compare>::value) {} function in namespace:std
|
p9-noexcept.cpp | 5 void target() noexcept 15 void reverse() noexcept(false) function
|
p11.cpp | 4 void f() noexcept {
|
/external/clang/test/SemaCXX/ |
implicit-exception-spec.cpp | 11 // Noexcept::Noexcept() is implicitly declared as noexcept(false), because it 14 // If noexcept(Noexcept()) is false, then Noexcept() is a constant expression, 15 // so noexcept(Noexcept()) is true. But if noexcept(Noexcept()) is true, the [all...] |
dependent-noexcept-unevaluated.cpp | 5 declval() noexcept; 14 void swap(T& x, T& y) noexcept(some_trait<T>::value) function 26 void swap(array& a) noexcept(noexcept(::swap(declval<T&>(), declval<T&>())));
|
member-init.cpp | 37 struct ThrowCtor { ThrowCtor(int) noexcept(false); }; 38 struct NoThrowCtor { NoThrowCtor(int) noexcept(true); }; 43 static_assert(!noexcept(Throw()), "incorrect exception specification"); 44 static_assert(noexcept(NoThrow()), "incorrect exception specification"); 47 CheckExcSpec() noexcept(true) = default; 51 CheckExcSpecFail() noexcept(true) = default; // expected-error {{exception specification of explicitly defaulted default constructor does not match the calculated one}}
|
blocks-1.cpp | 52 template <class T> void foo(T &x) noexcept(noexcept(x.foo()));
|
/external/clang/test/CXX/expr/expr.prim/expr.prim.general/ |
p3-0x.cpp | 5 float &f(int*) const noexcept; member in struct:A 8 auto g1() noexcept(noexcept(f(ptr))) -> decltype(f(this->ptr)); 9 auto g2() const noexcept(noexcept(f((*this).ptr))) -> decltype(f(ptr)); 15 static_assert(!noexcept(a.g1()), "exception-specification failure"); 16 static_assert(noexcept(a.g2()), "exception-specification failure"); 30 float &f(T*) const noexcept; member in struct:C 33 auto g1() noexcept(noexcept(f(ptr))) -> decltype(f((*this).ptr)) 48 iter_swap(I x, I y) noexcept; member in namespace:PR10036 98 void foo(Derived& d) noexcept(noexcept(d.bar(d))) {} function in struct:PR12564::Derived [all...] |
/external/clang/test/CXX/special/class.copy/ |
p15-0x.cpp | 26 template<typename T> T &&declval() noexcept; member in namespace:PR11418 30 NonPOD(const NonPOD &) noexcept; member in struct:PR11418::NonPOD 31 NonPOD(NonPOD &&) noexcept; member in struct:PR11418::NonPOD 38 static_assert(noexcept(declval<X>()), "noexcept isn't working at all"); 39 static_assert(noexcept(X(declval<X&>())), "copy constructor can't throw"); 40 static_assert(noexcept(X(declval<X>())), "move constructor can't throw");
|
implicit-move.cpp | 9 ThrowingCopy() noexcept; member in struct:ThrowingCopy 10 ThrowingCopy(ThrowingCopy &&) noexcept; member in struct:ThrowingCopy 11 ThrowingCopy(const ThrowingCopy &) noexcept(false); 12 ThrowingCopy & operator =(ThrowingCopy &&) noexcept; member in struct:ThrowingCopy 13 ThrowingCopy & operator =(const ThrowingCopy &) noexcept(false); 18 HasCopyConstructor() noexcept; member in struct:HasCopyConstructor 19 HasCopyConstructor(const HasCopyConstructor &) noexcept(false); 24 HasCopyAssignment() noexcept; member in struct:HasCopyAssignment 25 HasCopyAssignment & operator =(const HasCopyAssignment &) noexcept(false); 30 HasMoveConstructor() noexcept; member in struct:HasMoveConstructor 31 HasMoveConstructor(HasMoveConstructor &&) noexcept; \/\/ expected-note {{copy assignment operator is implicitly deleted because 'HasMoveConstructor' has a user-declared move constructor}} member in struct:HasMoveConstructor 36 HasMoveAssignment() noexcept; member in struct:HasMoveAssignment 37 HasMoveAssignment & operator =(HasMoveAssignment &&) noexcept; member in struct:HasMoveAssignment 42 HasDestructor() noexcept; member in struct:HasDestructor 43 ~HasDestructor() noexcept; member in struct:HasDestructor 69 PrivateMove() noexcept; member in struct:PrivateMove 73 PrivateMove(PrivateMove &&) noexcept; member in struct:PrivateMove 74 PrivateMove & operator =(PrivateMove &&) noexcept; member in struct:PrivateMove 83 PrivateDestructor() noexcept; member in struct:PrivateDestructor 85 PrivateDestructor(PrivateDestructor &&) noexcept; member in struct:PrivateDestructor 87 ~PrivateDestructor() noexcept; member in struct:PrivateDestructor 96 NonTrivialCopyOnly() noexcept; member in struct:NonTrivialCopyOnly 108 ContainsConst() noexcept; member in struct:ContainsConst 114 ContainsRef() noexcept; member in struct:ContainsRef 159 ContainsRValueRef() noexcept; member in struct:ContainsRValueRef [all...] |
/external/clang/test/SemaTemplate/ |
instantiate-exception-spec-cxx11.cpp | 16 static void f() noexcept(A<U>().n); 23 static_assert(noexcept(A<int>::B<char>::f()), ""); 26 static void recurse() noexcept(noexcept(S<N+1>::recurse())); // \ 34 void (*pFn2)() noexcept = &S<0>::recurse; // expected-note {{instantiation of exception spec}} expected-error {{not superset}} 37 template<typename T> T go(T a) noexcept(noexcept(go(a))); // \ 62 static int f() noexcept(noexcept(A<T>().f("boo!"))) { return 0; } // \ 72 template<typename T> T declval() noexcept; member in namespace:core_19754_example 125 virtual void f() noexcept; \/\/ expected-note {{overridden}} member in struct:Base [all...] |
/external/clang/test/CXX/expr/expr.prim/expr.prim.lambda/ |
p5.cpp | 54 static_assert(!noexcept(tl1()), "lambda can throw"); 55 static_assert(!noexcept(tl2()), "lambda can throw"); 58 auto ntl2 = []() noexcept(true) {}; 59 auto ntl3 = []() noexcept {}; 60 static_assert(noexcept(ntl1()), "lambda cannot throw"); 61 static_assert(noexcept(ntl2()), "lambda cannot throw"); 62 static_assert(noexcept(ntl3()), "lambda cannot throw");
|
/external/clang/test/CodeGenCXX/ |
cxx11-exception-spec.cpp | 5 template<typename T> void f() noexcept(sizeof(T) == 4) { h(); } 6 template<typename T> void g() noexcept(sizeof(T) == 4); 9 static void f() noexcept(sizeof(T) == 4) { h(); } 10 static void g() noexcept(sizeof(T) == 4); 16 template<> void f<short[2]>() noexcept { h(); } 22 template<> void S<short[2]>::f() noexcept { h(); } 110 template<bool b, typename U> void f() noexcept(sizeof(T) == sizeof(U));
|
cxx0x-delegating-ctors.cpp | 5 ~non_trivial() noexcept(false); 8 non_trivial::~non_trivial() noexcept(false) {} function
|
/external/clang/test/CXX/special/class.dtor/ |
p3-0x.cpp | 17 ~D() noexcept(false); 38 F::~F() noexcept(false) {} function 78 ~TD() noexcept(false); 102 TF<T>::~TF() noexcept(false) {} function
|
/external/clang/test/Lexer/ |
cxx0x_keyword_as_cxx98.cpp | 33 int noexcept; // expected-warning {{'noexcept' is a keyword in C++11}} variable
|