Home
last modified time | relevance | path

Searched refs:noexcept (Results 1 – 25 of 169) sorted by relevance

1234567

/external/clang/test/CXX/expr/expr.prim/expr.prim.general/
Dp3-0x.cpp5 float &f(int*) const noexcept;
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"); in testA()
16 static_assert(noexcept(a.g2()), "exception-specification failure"); in testA()
30 float &f(T*) const noexcept;
33 auto g1() noexcept(noexcept(f(ptr))) -> decltype(f(ptr));
34 auto g2() const noexcept(noexcept(f(((this))->ptr))) -> decltype(f(ptr));
35 auto g3() noexcept(noexcept(f(this->ptr))) -> decltype(f((*this).ptr));
36 auto g4() const noexcept(noexcept(f(((this))->ptr))) -> decltype(f(this->ptr));
[all …]
/external/clang/test/CXX/except/except.spec/
Dp14.cpp40 static_assert(noexcept(IC0()), "IC0() does not throw");
41 static_assert(!noexcept(IC1()), "IC1() throws");
46 NoThrowMove(NoThrowMove &&) noexcept;
48 NoThrowMove &operator=(NoThrowMove &&) const noexcept;
51 NoThrowMoveOnly(NoThrowMoveOnly &&) noexcept;
52 NoThrowMoveOnly &operator=(NoThrowMoveOnly &&) noexcept;
63 static_assert(!noexcept(X(X::val())), "");
64 static_assert(!noexcept(X::ref() = X::val()), "");
72 ThrowingBase() noexcept(false);
73 ThrowingBase(const ThrowingBase&) noexcept(false);
[all …]
Dp3.cpp45 extern void (*r10)() noexcept;
46 extern void (*r10)() noexcept;
49 extern void (*r11)() noexcept;
50 extern void (*r11)() noexcept(true);
53 extern void (*r12)() noexcept; // expected-note {{previous declaration}}
54 extern void (*r12)() noexcept(false); // expected-error {{does not match}}
57 extern void (*r13)() noexcept(1 < 2);
58 extern void (*r13)() noexcept(2 > 1);
61 extern void (*r14)() noexcept(true); // expected-note {{previous declaration}}
62 extern void (*r14)() noexcept(false); // expected-error {{does not match}}
[all …]
Dp5-virtual.cpp35 virtual void f7() noexcept;
36 virtual void f8() noexcept;
37 virtual void f9() noexcept(false);
38 virtual void f10() noexcept(false);
41 virtual void f12() noexcept;
42 virtual void f13() noexcept(false);
54 virtual void g6() noexcept; // expected-note {{overridden virtual function is here}}
55 virtual void g7() noexcept; // expected-note {{overridden virtual function is here}}
57 virtual void g8() noexcept; // expected-note {{overridden virtual function is here}}
71 virtual void f7() noexcept;
[all …]
Dp1.cpp29 void f1() noexcept { } in f1()
30 void f2() noexcept (true) { } in f2()
31 void f3() noexcept (false) { } in f3()
32 void f4() noexcept (1 < 2) { } in f4()
35 void foo() noexcept { } in foo()
36 void bar() noexcept (true) { } in bar()
39 void (*fptr1)() noexcept;
40 void (*fptr2)() noexcept (true);
46 void f() throw(int) noexcept { } // expected-error {{cannot have both}} in f()
47 void g() noexcept throw(int) { } // expected-error {{cannot have both}} in g()
[all …]
Dp2-places.cpp46 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 typedef…
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}}
62 void (**(*h())())() noexcept(false); // expected-error {{not allowed beyond a single}}
Dp4.cpp12 void S::a() noexcept {} // expected-error {{does not match previous}} in a()
13 S::~S() noexcept {} // expected-warning {{function previously declared with an implicit exception s… in ~S()
14 void S::operator delete(void*) noexcept {} // expected-warning {{function previously declared with … in operator delete()
17 void a() noexcept; // expected-note {{here}}
18 ~T() noexcept; // expected-note {{here}}
19 void operator delete(void*) noexcept; // expected-note {{here}}
35 template<typename T> U<T>::~U() noexcept(true) {} // expected-error {{exception specification in de… in ~U()
36 template<typename T> void U<T>::operator delete(void*) noexcept(false) {} // expected-error {{excep… in operator delete()
Dp15.cpp19 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}}
Dcanonical.cpp9 template <class _Tp> _Tp&& declval() noexcept;
14 static const bool value = noexcept(_Tp(declval<_Args>()...));
25 noexcept(_is_nothrow_constructible<allocator_type>::value);
33 noexcept(_is_nothrow_constructible<_Compare>::value);
48 basic_string<T, _Traits, _Allocator>::basic_string() noexcept(_is_nothrow_constructible<allocator_t… in basic_string()
52 noexcept(_is_nothrow_constructible<_Compare>::value) {} in __map_value_compare()
/external/clang/test/CXX/special/class.copy/
Dimplicit-move.cpp9 ThrowingCopy() noexcept;
10 ThrowingCopy(ThrowingCopy &&) noexcept;
11 ThrowingCopy(const ThrowingCopy &) noexcept(false);
12 ThrowingCopy & operator =(ThrowingCopy &&) noexcept;
13 ThrowingCopy & operator =(const ThrowingCopy &) noexcept(false);
18 HasCopyConstructor() noexcept;
19 HasCopyConstructor(const HasCopyConstructor &) noexcept(false);
24 HasCopyAssignment() noexcept;
25 HasCopyAssignment & operator =(const HasCopyAssignment &) noexcept(false);
30 HasMoveConstructor() noexcept;
[all …]
Dp13-0x.cpp97 friend constexpr U::U() noexcept;
98 friend constexpr U::U(U&&) noexcept;
99 friend constexpr U::U(const U&) noexcept;
101 friend constexpr V::V(V&&) noexcept;
102 friend constexpr V::V(const V&) noexcept;
104 friend constexpr W::W(W&&) noexcept;
105 friend constexpr W::W(const W&) noexcept;
106 friend constexpr S<U>::S() noexcept;
107 friend constexpr S<U>::S(S<U>&&) noexcept;
108 friend constexpr S<U>::S(const S<U>&) noexcept;
[all …]
Dp15-0x.cpp27 template<typename T> T &&declval() noexcept;
31 NonPOD(const NonPOD &) noexcept;
32 NonPOD(NonPOD &&) noexcept;
39 static_assert(noexcept(declval<X>()), "noexcept isn't working at all");
40 static_assert(noexcept(X(declval<X&>())), "copy constructor can't throw");
41 static_assert(noexcept(X(declval<X>())), "move constructor can't throw");
/external/clang/test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.default/
Dp2.cpp62 E1() noexcept = default;
63 E1(const E1&) noexcept = default;
64 E1(E1&&) noexcept = default;
65 E1 &operator=(const E1&) noexcept = default;
66 E1 &operator=(E1&&) noexcept = default;
67 ~E1() noexcept = default;
70 …E2() noexcept(false) = default; // expected-error {{exception specification of explicitly defaulte…
71 …E2(const E2&) noexcept(false) = default; // expected-error {{exception specification of explicitly…
72 …E2(E2&&) noexcept(false) = default; // expected-error {{exception specification of explicitly defa…
73 …E2 &operator=(const E2&) noexcept(false) = default; // expected-error {{exception specification of…
[all …]
/external/clang/test/SemaTemplate/
Dinstantiate-exception-spec-cxx11.cpp19 static void f() noexcept(A<U>().n);
26 static_assert(noexcept(A<int>::B<char>::f()), "");
29 static void recurse() noexcept(noexcept(S<N+1>::recurse())); // \
37 void (*pFn2)() noexcept = &S<0>::recurse; // expected-note {{instantiation of exception spec}} expe…
52 static int f() noexcept(noexcept(A<T>().f("boo!"))) { return 0; } // \ in f()
64 template<typename T> T declval() noexcept;
72 void irrelevant(wrap &p) noexcept(is_movable<T>::value);
105 template <typename T> void f2(T) noexcept(T::throws); // expected-note {{candidate}}
106 template <typename T> void f2(T, int = 0) noexcept(T::sworht); // expected-note {{candidate}}
117 virtual void f() noexcept; // expected-note {{overridden}}
[all …]
/external/clang/test/SemaCXX/
Dimplicit-exception-spec.cpp18 bool ThrowSomething() noexcept(false);
20 …bool b = noexcept(ConstExpr()) && ThrowSomething(); // expected-error {{cannot be used by non-stat…
23 bool w = noexcept(ConstExpr());
28 …int n = ExceptionIf<noexcept(TemplateArg())>::f(); // expected-error {{cannot be used by non-stati…
30 bool x = noexcept(TemplateArg());
35 …int n = ExceptionIf<noexcept(Nested())>::f(); // expected-note {{implicit default constructor for …
43 int n = ExceptionIf<noexcept(Nested2())>::f();
54 T() noexcept(!noexcept(Nested())); // expected-error{{incomplete type}}
62 …T(int = ExceptionIf<noexcept(Default())::f()); // expected-error {{call to implicitly-deleted defa…
Dcxx0x-defaulted-functions.cpp66 pair(const pair&) noexcept(noexcept(T(declval<T>())));
85 (void)noexcept(B(declval<B>())); in f()
93 void f() noexcept(T::error); // expected-error 2{{has no members}}
95 Error() noexcept(T::error);
96 Error(const Error&) noexcept(T::error);
97 Error(Error&&) noexcept(T::error);
98 Error &operator=(const Error&) noexcept(T::error);
99 Error &operator=(Error&&) noexcept(T::error);
100 ~Error() noexcept(T::error);
181 A() noexcept(true) = default;
[all …]
/external/libcxx/include/
Datomic32 template <class T> T kill_dependency(T y) noexcept;
51 bool test_and_set(memory_order m = memory_order_seq_cst) volatile noexcept;
52 bool test_and_set(memory_order m = memory_order_seq_cst) noexcept;
53 void clear(memory_order m = memory_order_seq_cst) volatile noexcept;
54 void clear(memory_order m = memory_order_seq_cst) noexcept;
55 atomic_flag() noexcept = default;
62 atomic_flag_test_and_set(volatile atomic_flag* obj) noexcept;
65 atomic_flag_test_and_set(atomic_flag* obj) noexcept;
69 memory_order m) noexcept;
72 atomic_flag_test_and_set_explicit(atomic_flag* obj, memory_order m) noexcept;
[all …]
Dexception23 exception() noexcept;
24 exception(const exception&) noexcept;
25 exception& operator=(const exception&) noexcept;
26 virtual ~exception() noexcept;
27 virtual const char* what() const noexcept;
34 bad_exception() noexcept;
35 bad_exception(const bad_exception&) noexcept;
36 bad_exception& operator=(const bad_exception&) noexcept;
37 virtual ~bad_exception() noexcept;
38 virtual const char* what() const noexcept;
[all …]
Dnew24 bad_alloc() noexcept;
25 bad_alloc(const bad_alloc&) noexcept;
26 bad_alloc& operator=(const bad_alloc&) noexcept;
27 virtual const char* what() const noexcept;
33 bad_array_length() noexcept;
39 bad_array_new_length() noexcept;
45 new_handler set_new_handler(new_handler new_p) noexcept;
46 new_handler get_new_handler() noexcept;
51 void* operator new(std::size_t size, const std::nothrow_t&) noexcept; // replaceable
52 void operator delete(void* ptr) noexcept; // replaceable
[all …]
Dsystem_error23 virtual ~error_category() noexcept;
29 virtual const char* name() const noexcept = 0;
30 virtual error_condition default_error_condition(int ev) const noexcept;
31 virtual bool equivalent(int code, const error_condition& condition) const noexcept;
32 virtual bool equivalent(const error_code& code, int condition) const noexcept;
35 bool operator==(const error_category& rhs) const noexcept;
36 bool operator!=(const error_category& rhs) const noexcept;
37 bool operator<(const error_category& rhs) const noexcept;
40 const error_category& generic_category() noexcept;
41 const error_category& system_category() noexcept;
[all …]
Dtypeinfo25 bool operator==(const type_info& rhs) const noexcept;
26 bool operator!=(const type_info& rhs) const noexcept;
28 bool before(const type_info& rhs) const noexcept;
29 size_t hash_code() const noexcept;
30 const char* name() const noexcept;
40 bad_cast() noexcept;
41 bad_cast(const bad_cast&) noexcept;
42 bad_cast& operator=(const bad_cast&) noexcept;
43 virtual const char* what() const noexcept;
50 bad_typeid() noexcept;
[all …]
Dtypeindex24 type_index(const type_info& rhs) noexcept;
26 bool operator==(const type_index& rhs) const noexcept;
27 bool operator!=(const type_index& rhs) const noexcept;
28 bool operator< (const type_index& rhs) const noexcept;
29 bool operator<=(const type_index& rhs) const noexcept;
30 bool operator> (const type_index& rhs) const noexcept;
31 bool operator>=(const type_index& rhs) const noexcept;
33 size_t hash_code() const noexcept;
34 const char* name() const noexcept;
41 size_t operator()(type_index index) const noexcept;
/external/libcxx/include/experimental/
Ddynarray57 iterator begin() noexcept;
58 const_iterator begin() const noexcept;
59 const_iterator cbegin() const noexcept;
60 iterator end() noexcept;
61 const_iterator end() const noexcept;
62 const_iterator cend() const noexcept;
64 reverse_iterator rbegin() noexcept;
65 const_reverse_iterator rbegin() const noexcept;
66 const_reverse_iterator crbegin() const noexcept;
67 reverse_iterator rend() noexcept;
[all …]
/external/clang/test/CXX/expr/expr.prim/expr.prim.lambda/
Dp5.cpp53 static_assert(!noexcept(tl1()), "lambda can throw"); in test_exception_spec()
54 static_assert(!noexcept(tl2()), "lambda can throw"); in test_exception_spec()
57 auto ntl2 = []() noexcept(true) {}; in test_exception_spec()
58 auto ntl3 = []() noexcept {}; in test_exception_spec()
59 static_assert(noexcept(ntl1()), "lambda cannot throw"); in test_exception_spec()
60 static_assert(noexcept(ntl2()), "lambda cannot throw"); in test_exception_spec()
61 static_assert(noexcept(ntl3()), "lambda cannot throw"); in test_exception_spec()
/external/clang/test/CodeGenCXX/
Dcxx11-exception-spec.cpp6 template<typename T> void f() noexcept(sizeof(T) == 4) { h(); } in f()
7 template<typename T> void g() noexcept(sizeof(T) == 4);
10 static void f() noexcept(sizeof(T) == 4) { h(); } in f()
11 static void g() noexcept(sizeof(T) == 4);
17 template<> void f<short[2]>() noexcept { h(); } in f()
23 template<> void S<short[2]>::f() noexcept { h(); } in f()
111 template<bool b, typename U> void f() noexcept(sizeof(T) == sizeof(U));

1234567