/external/clang/test/CXX/expr/expr.unary/expr.unary.noexcept/ |
H A D | ser.h | 1 // Serialization testing helper for noexcept, included by cg.cpp. 4 return noexcept(0); 7 return noexcept(throw 0);
|
H A D | cg.cpp | 16 b = noexcept(0); 18 b = noexcept(throw 0); 24 D(), noexcept(E());
|
/external/clang/test/CXX/except/except.spec/ |
H A D | p15.cpp | 13 // Deallocation functions are implicitly noexcept. 19 static_assert(noexcept(operator delete(0)), ""); 20 static_assert(noexcept(operator delete[](0)), ""); 26 static_assert(noexcept(operator delete(0, 0.f)), ""); 27 static_assert(noexcept(operator delete[](0, 0.f)), ""); 31 static_assert(!noexcept(operator delete(0, 0.)), ""); 32 void operator delete(void*, double) noexcept; // expected-error {{does not match}}
|
H A D | 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(fals [all...] |
H A D | p9-noexcept.cpp | 5 void target() noexcept 16 void reverse() noexcept(false) function
|
H A D | 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(fals [all...] |
H A D | 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 { } // expecte 68 noexcept(sizeof(T) == sizeof(int)) || noexcept(f(x)) argument [all...] |
H A D | p11.cpp | 5 void f() noexcept {
|
H A D | 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...] |
H A D | 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}}
|
H A D | p4.cpp | 12 void S::a() noexcept {} // expected-error {{does not match previous}} 13 S::~S() noexcept {} // expected-warning {{function previously declared with an implicit exception specification redeclared with an explicit exception specification}} 14 void S::operator delete(void*) noexcept {} // expected-warning {{function previously declared with an implicit exception specification redeclared with an explicit exception specification}} 17 void a() noexcept; // expected-note {{here}} member in struct:T 18 ~T() noexcept; // expected-note {{here}} member in struct:T 19 void operator delete(void*) noexcept; // expected-note {{here}} member in struct:T 22 void T::a() {} // expected-error {{missing exception specification 'noexcept'}} 35 template<typename T> U<T>::~U() noexcept(true) {} // expected-error {{exception specification in declaration does not match previous declaration}} function 36 template<typename T> void U<T>::operator delete(void*) noexcept(false) {} // expected-error {{exception specification in declaration does not match previous declaration}} function
|
H A D | p14.cpp | 40 static_assert(noexcept(IC0()), "IC0() does not throw"); 41 static_assert(!noexcept(IC1()), "IC1() throws"); 46 NoThrowMove(NoThrowMove &&) noexcept; member in struct:PR13381::NoThrowMove 48 NoThrowMove &operator=(NoThrowMove &&) const noexcept; member in struct:PR13381::NoThrowMove 51 NoThrowMoveOnly(NoThrowMoveOnly &&) noexcept; member in struct:PR13381::NoThrowMoveOnly 52 NoThrowMoveOnly &operator=(NoThrowMoveOnly &&) noexcept; member in struct:PR13381::NoThrowMoveOnly 63 static_assert(!noexcept(X(X::val())), ""); 64 static_assert(!noexcept(X::ref() = X::val()), ""); 68 // Part of DR1351: the implicit exception-specification is noexcept(false) if 70 // "any". Hence it is compatible with noexcept(fals [all...] |
/external/clang/test/CodeGenCXX/ |
H A D | microsoft-abi-eh-terminate.cpp | 5 void never_throws() noexcept(true) { function
|
H A D | destructor-crash.cpp | 16 ~C() noexcept; member in struct:C 19 C::~C() noexcept {}
|
H A D | noexcept.cpp | 5 // std::terminate in a noexcept function. 14 void test() noexcept {
|
/external/clang/test/SemaCXX/ |
H A D | cxx0x-noexcept-expression.cpp | 7 bool b = noexcept(f); // expected-error {{reference to overloaded function could not be resolved; did you mean to call it with no arguments?}} 8 bool b2 = noexcept(f(0)); 16 bool b = noexcept(this->g); // expected-error {{reference to non-static member function must be called; did you mean to call it with no arguments?}} 17 bool b2 = noexcept(this->g(0));
|
H A D | cxx1y-sized-deallocation.cpp | 4 void operator delete(void *, size_t) noexcept; // expected-note {{'operator delete' declared here}} 5 void operator delete[](void *, size_t) noexcept; 11 static_assert(noexcept(operator delete(p, 8)), ""); 12 static_assert(noexcept(operator delete[](q, 12)), "");
|
H A D | warn-unused-value-cxx11.cpp | 18 (void)noexcept(++i); // expected-warning {{expression with side effects has no effect in an unevaluated context}} 34 (void)noexcept(s++); // Ok 35 (void)noexcept(i++); // expected-warning {{expression with side effects has no effect in an unevaluated context}} 36 (void)noexcept(i = 5); // expected-warning {{expression with side effects has no effect in an unevaluated context}} 37 (void)noexcept(s = 5); // Ok 41 (void)noexcept(s.g() = 5); // Ok
|
H A D | 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, then 16 // Noexcept::Noexcept is not declared constexpr, therefore noexcept(Noexcept()) 18 bool ThrowSomething() noexcept(false); 20 bool b = noexcept(ConstExpr()) && ThrowSomething(); // expected-error {{cannot use defaulted default constructor of 'ConstExpr' within the class outside of member functions}} 25 // knowing whether it produces a noexcept expression. 27 int n = ExceptionIf<noexcept(TemplateArg())>::f(); // expected-error {{cannot use defaulted default constructor of 'TemplateArg' within the class outside of member functions}} 35 int n = ExceptionIf<noexcept(Neste [all...] |
/external/libcxx/src/ |
H A D | variant.cpp | 14 const char* bad_variant_access::what() const noexcept {
|
/external/clang/test/SemaTemplate/ |
H A D | instantiation-depth-exception-spec.cpp | 3 template<typename T> T go(T a) noexcept(noexcept(go(a))); // \
|
H A D | instantiation-depth.cpp | 22 S() noexcept(noexcept(T()));
|
/external/libcxx/test/std/utilities/meta/meta.unary/meta.unary.cat/ |
H A D | member_function_pointer.pass.cpp | 83 test_member_function_pointer<void (Class::*)() noexcept>(); 84 test_member_function_pointer<void (Class::*)(int) noexcept>(); 85 test_member_function_pointer<void (Class::*)(int, char) noexcept>(); 87 test_member_function_pointer<void (Class::*)() const noexcept>(); 88 test_member_function_pointer<void (Class::*)(int) const noexcept>(); 89 test_member_function_pointer<void (Class::*)(int, char) const noexcept>(); 91 test_member_function_pointer<void (Class::*)() volatile noexcept>(); 92 test_member_function_pointer<void (Class::*)(int) volatile noexcept>(); 93 test_member_function_pointer<void (Class::*)(int, char) volatile noexcept>(); 95 test_member_function_pointer<void (Class::*)(...) noexcept>(); [all...] |
/external/clang/test/CXX/expr/expr.prim/expr.prim.general/ |
H A D | 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( 76 iter_swap(I x, I y) noexcept; member in namespace:PR10036 143 void foo(Derived& d) noexcept(noexcept(d.bar(d))) {} function in struct:PR12564::Derived [all...] |
/external/clang/test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.default/ |
H A D | p2.cpp | 62 E1() noexcept = default; member in struct:E1 63 E1(const E1&) noexcept = default; member in struct:E1 64 E1(E1&&) noexcept = default; member in struct:E1 65 E1 &operator=(const E1&) noexcept = default; member in struct:E1 66 E1 &operator=(E1&&) noexcept = default; member in struct:E1 67 ~E1() noexcept = default; member in struct:E1 70 E2() noexcept(false) = default; // expected-error {{exception specification of explicitly defaulted default constructor does not match the calculated one}} 71 E2(const E2&) noexcept(false) = default; // expected-error {{exception specification of explicitly defaulted copy constructor does not match the calculated one}} 72 E2(E2&&) noexcept(false) = default; // expected-error {{exception specification of explicitly defaulted move constructor does not match the calculated one}} 73 E2 &operator=(const E2&) noexcept(fals [all...] |