Home
last modified time | relevance | path

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

12345678910

/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}}
/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 …]
/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 void f() noexcept(T::error);
65 void (g)() noexcept(T::error);
71 template<typename T> T declval() noexcept;
79 void irrelevant(wrap &p) noexcept(is_movable<T>::value);
112 template <typename T> void f2(T) noexcept(T::throws); // expected-note {{candidate}}
[all …]
/external/clang/test/SemaCXX/
Dlibstdcxx_pair_swap_hack.cpp26 template<typename T> void do_swap(T &a, T &b) noexcept(noexcept(swap(a, b))) { in do_swap()
32 void swap(CLASS &other) noexcept(noexcept(do_swap(member, other.member)));
36 void swap(CLASS &other) noexcept(noexcept(swap(member, other.member)));
55 void swap(X &, X &) noexcept;
59 static_assert(noexcept(px.swap(px)), "");
60 static_assert(!noexcept(pi.swap(pi)), "");
66 …void swap(CLASS &other) noexcept(noexcept(swap(*this, other))); // expected-error {{too many argum…
71 static_assert(!noexcept(pi.swap(pi)), ""); // expected-note {{in instantiation of}}
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 …]
Dimplicit-exception-spec.cpp18 bool ThrowSomething() noexcept(false);
20 …bool b = noexcept(ConstExpr()) && ThrowSomething(); // expected-error {{cannot use defaulted defau…
27 …int n = ExceptionIf<noexcept(TemplateArg())>::f(); // expected-error {{cannot use defaulted defaul…
35 …int n = ExceptionIf<noexcept(Nested())>::f(); // expected-note {{implicit default constructor for …
44 int n = ExceptionIf<noexcept(Nested2())>::f();
55 T() noexcept(!noexcept(Nested()));
63 …T(int = ExceptionIf<noexcept(Default())::f()); // expected-error {{call to implicitly-deleted defa…
/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 …]
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 …]
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 …]
/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/libcxx/test/std/containers/unord/unord.set/unord.set.swap/
Dswap_noexcept.pass.cpp54 void swap(some_comp2<T>&, some_comp2<T>&) noexcept {} in swap()
75 void swap(some_hash2<T>&, some_hash2<T>&) noexcept {} in swap()
122 static_assert(noexcept(swap(c1, c2)), ""); in main()
128 static_assert(noexcept(swap(c1, c2)), ""); in main()
134 static_assert(noexcept(swap(c1, c2)), ""); in main()
139 static_assert(!noexcept(swap(c1, c2)), ""); in main()
145 static_assert(!noexcept(swap(c1, c2)), ""); in main()
152 static_assert(!noexcept(swap(c1, c2)), ""); in main()
157 static_assert(!noexcept(swap(c1, c2)), ""); in main()
162 static_assert(!noexcept(swap(c1, c2)), ""); in main()
[all …]
/external/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/
Dswap_noexcept.pass.cpp54 void swap(some_comp2<T>&, some_comp2<T>&) noexcept {} in swap()
75 void swap(some_hash2<T>&, some_hash2<T>&) noexcept {} in swap()
122 static_assert(noexcept(swap(c1, c2)), ""); in main()
128 static_assert(noexcept(swap(c1, c2)), ""); in main()
134 static_assert(noexcept(swap(c1, c2)), ""); in main()
139 static_assert(!noexcept(swap(c1, c2)), ""); in main()
145 static_assert(!noexcept(swap(c1, c2)), ""); in main()
152 static_assert(!noexcept(swap(c1, c2)), ""); in main()
157 static_assert(!noexcept(swap(c1, c2)), ""); in main()
162 static_assert(!noexcept(swap(c1, c2)), ""); in main()
[all …]
/external/libcxx/test/std/containers/unord/unord.map/unord.map.swap/
Dswap_noexcept.pass.cpp54 void swap(some_comp2<T>&, some_comp2<T>&) noexcept {} in swap()
75 void swap(some_hash2<T>&, some_hash2<T>&) noexcept {} in swap()
124 static_assert(noexcept(swap(c1, c2)), ""); in main()
130 static_assert(noexcept(swap(c1, c2)), ""); in main()
136 static_assert(noexcept(swap(c1, c2)), ""); in main()
141 static_assert(!noexcept(swap(c1, c2)), ""); in main()
147 static_assert(!noexcept(swap(c1, c2)), ""); in main()
154 static_assert(!noexcept(swap(c1, c2)), ""); in main()
159 static_assert(!noexcept(swap(c1, c2)), ""); in main()
164 static_assert(!noexcept(swap(c1, c2)), ""); in main()
[all …]
/external/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/
Dswap_noexcept.pass.cpp54 void swap(some_comp2<T>&, some_comp2<T>&) noexcept {} in swap()
75 void swap(some_hash2<T>&, some_hash2<T>&) noexcept {} in swap()
123 static_assert(noexcept(swap(c1, c2)), ""); in main()
129 static_assert(noexcept(swap(c1, c2)), ""); in main()
135 static_assert(noexcept(swap(c1, c2)), ""); in main()
140 static_assert(!noexcept(swap(c1, c2)), ""); in main()
146 static_assert(!noexcept(swap(c1, c2)), ""); in main()
153 static_assert(!noexcept(swap(c1, c2)), ""); in main()
158 static_assert(!noexcept(swap(c1, c2)), ""); in main()
163 static_assert(!noexcept(swap(c1, c2)), ""); in main()
[all …]
/external/libcxx/test/std/strings/basic.string/string.cons/
Dalloc.pass.cpp27 static_assert((noexcept(S{})), "" ); in test()
29 static_assert((noexcept(S()) == noexcept(typename S::allocator_type())), "" ); in test()
40 static_assert((noexcept(S{typename S::allocator_type{}})), "" ); in test()
42 …static_assert((noexcept(S(typename S::allocator_type())) == std::is_nothrow_copy_constructible<typ… in test()
61 static_assert((noexcept(S{})), "" ); in test2()
63 static_assert((noexcept(S()) == noexcept(typename S::allocator_type())), "" ); in test2()
74 static_assert((noexcept(S{typename S::allocator_type{}})), "" ); in test2()
76 …static_assert((noexcept(S(typename S::allocator_type())) == std::is_nothrow_copy_constructible<typ… in test2()

12345678910