Home
last modified time | relevance | path

Searched refs:nothrow (Results 1 – 25 of 108) sorted by relevance

12345

/llvm-project-15.0.7/clang/test/SemaCXX/
H A Dnothrow-vs-exception-specs.cpp4 __attribute__((nothrow)) void f1();
11 __attribute__((nothrow)) void f2();
17 void f3() __attribute__((nothrow));
25 __attribute__((nothrow)) void f4() throw();
29 __attribute__((nothrow)) void f5() noexcept;
39 __attribute__((nothrow)) void f7() throw(int);
48 __declspec(nothrow) void foo1() noexcept;
64 __declspec(nothrow) void f1();
66 __declspec(nothrow) void f2() throw();
67 __declspec(nothrow) void f3() throw(int);
[all …]
H A Dnothrow-as-noexcept-ctor.cpp5 __attribute__((nothrow)) Base() {} in Base()
17 __attribute__((nothrow)) Derived2() = default;
21 __attribute__((nothrow)) Base3() {} in Base3()
25 __attribute__((nothrow)) Derived3() = default;
H A Dunavailable_aligned_allocation.cpp18 nothrow_t nothrow; variable
44 p = new (std::nothrow) S; in test()
48 pa = new (std::nothrow) S[4]; in test()
55 p = new (std::nothrow) OveralignedS; in testOveraligned()
60 pa = new (std::nothrow) OveralignedS[4]; in testOveraligned()
H A Dimplicit-exception-spec.cpp96 struct nothrow_t {} nothrow; variable
127 static_assert(noexcept(new (nothrow) T()) == A, ""); // expected-error 2{{abstract}} in check()
128 static_assert(noexcept(new (nothrow) T(a)) == B, ""); in check()
129 static_assert(noexcept(new (nothrow) T(static_cast<T&&>(a))) == C, ""); in check()
/llvm-project-15.0.7/clang/test/Analysis/
H A Dcxx-dynamic-memory-analysis-order.cpp68 p = new (std::nothrow) int; in f()
69 operator delete(p, std::nothrow); in f()
77 v = operator new(sizeof(int[2]), std::align_val_t(2), std::nothrow); in f()
78 operator delete(v, std::align_val_t(2), std::nothrow); in f()
120 p = new (std::nothrow) int[2]; in f()
121 operator delete[](p, std::nothrow); in f()
129 v = operator new[](sizeof(int[2]), std::align_val_t(2), std::nothrow); in f()
130 operator delete[](v, std::align_val_t(2), std::nothrow); in f()
H A DNewDelete-custom.cpp12 void *operator new(std::size_t size, const std::nothrow_t &nothrow) throw() { return allocator(size… in operator new() argument
48 void *p = operator new(0, std::nothrow); // call is inlined, no warn in testOpNewNoThrow()
52 int *p = new(std::nothrow) int; // no-warning in testNewExprNoThrow()
/llvm-project-15.0.7/compiler-rt/test/sanitizer_common/TestCases/Linux/
H A Dnew_delete_test.cpp18 static const nothrow_t nothrow; variable
61 operator delete(break_optimization(new S12), std::nothrow); in main()
63 operator delete[](break_optimization(new S12[100]), std::nothrow); in main()
69 std::align_val_t(alignof(S12_128)), std::nothrow); in main()
77 std::align_val_t(alignof(S12_128)), std::nothrow); in main()
/llvm-project-15.0.7/compiler-rt/lib/hwasan/
H A Dhwasan_new_delete.cpp25 # define OPERATOR_NEW_BODY(nothrow) \ argument
28 if (!nothrow && UNLIKELY(!res)) \
31 # define OPERATOR_NEW_ALIGN_BODY(nothrow) \ argument
34 if (!nothrow && UNLIKELY(!res)) \
49 # define OPERATOR_NEW_BODY(nothrow) return malloc(size) argument
/llvm-project-15.0.7/clang/test/Sema/
H A Dattr-nothrow.c9 void PR42113a(void) __attribute__((nothrow));
13 void PR42113b() __attribute__((nothrow));
16 __attribute__((nothrow)) void PR42113c();
/llvm-project-15.0.7/libcxx/test/std/concepts/concepts.lang/concept.swappable/
H A Dswappable.pass.cpp237 enum class nothrow { no, yes }; enum
239 template <nothrow is_noexcept, std::swappable T>
261 check_swap<nothrow::yes>(e); in main()
268 check_swap<nothrow::yes>(e); in main()
275 check_swap<nothrow::yes>(e); in main()
282 check_swap<nothrow::yes>(e); in main()
289 check_swap<nothrow::no>(e); in main()
296 check_swap<nothrow::yes>(e); in main()
304 check_swap<nothrow::yes>(e); in main()
/llvm-project-15.0.7/libcxx/test/libcxx/language.support/support.dynamic/
H A Dnew_faligned_allocation.pass.cpp59 void *ptr = ::operator new(1, std::align_val_t(128), std::nothrow); in main()
62 ::operator delete(ptr, std::align_val_t(128), std::nothrow); in main()
71 void *ptr = ::operator new[](1, std::align_val_t(128), std::nothrow); in main()
74 ::operator delete[](ptr, std::align_val_t(128), std::nothrow); in main()
H A Daligned_alloc_availability.verify.cpp36 …A* a2 = new(std::nothrow) A; // expected-error-re {{aligned allocation function of type {{.+}} is … in main()
49 …A* a2 = new(std::nothrow) A[2]; // expected-error-re {{aligned allocation function of type {{.+}} … in main()
/llvm-project-15.0.7/clang-tools-extra/docs/clang-tidy/checks/cert/
H A Derr60-cpp.rst6 This check flags all throw expressions where the exception object is not nothrow
10 `ERR60-CPP. Exception objects must be nothrow copy constructible
11 …rt.org/confluence/display/cplusplus/ERR60-CPP.+Exception+objects+must+be+nothrow+copy+constructibl…
/llvm-project-15.0.7/compiler-rt/lib/msan/
H A Dmsan_new_delete.cpp33 #define OPERATOR_NEW_BODY(nothrow) \ argument
36 if (!nothrow && UNLIKELY(!res)) ReportOutOfMemory(size, &stack);\
38 #define OPERATOR_NEW_BODY_ALIGN(nothrow) \ argument
41 if (!nothrow && UNLIKELY(!res)) ReportOutOfMemory(size, &stack);\
/llvm-project-15.0.7/compiler-rt/lib/dfsan/
H A Ddfsan_new_delete.cpp30 #define OPERATOR_NEW_BODY(nothrow) \ argument
32 if (!nothrow && UNLIKELY(!res)) { \
37 #define OPERATOR_NEW_BODY_ALIGN(nothrow) \ argument
39 if (!nothrow && UNLIKELY(!res)) { \
/llvm-project-15.0.7/clang/test/CodeGenCXX/
H A Dnew.cpp25 std::nothrow_t nothrow; variable
193 delete[] new (nothrow) Alloc[10][20]; in f()
337 (void) new (nothrow) S[3]; in f()
360 (void) operator new[](3, nothrow); in g()
H A Dcatch-undef-behavior.cpp546 struct nothrow {}; struct
547 void *operator new[](__SIZE_TYPE__, nothrow) noexcept;
567 return new (nothrow{}) char[123456]; in nothrow_new_trivial()
587 return new (nothrow{}) X[123456]; in nothrow_new_nontrivial()
627 return new (nothrow{}) char[0]; in throwing_new_zero_size()
/llvm-project-15.0.7/compiler-rt/lib/memprof/
H A Dmemprof_new_delete.cpp33 #define OPERATOR_NEW_BODY(type, nothrow) \ argument
36 if (!nothrow && UNLIKELY(!res)) \
39 #define OPERATOR_NEW_BODY_ALIGN(type, nothrow) \ argument
42 if (!nothrow && UNLIKELY(!res)) \
/llvm-project-15.0.7/libcxx/include/__memory/
H A Dtemporary_buffer.h44 __n * sizeof(_Tp), __al, nothrow)); in get_temporary_buffer()
47 __n * sizeof(_Tp), nothrow)); in get_temporary_buffer()
57 __r.first = static_cast<_Tp*>(::operator new(__n * sizeof(_Tp), nothrow)); in get_temporary_buffer()
/llvm-project-15.0.7/compiler-rt/test/asan/TestCases/Linux/
H A Daligned_delete_test.cpp16 static const nothrow_t nothrow; variable
61 operator delete(break_optimization(new S12_128), std::nothrow); in main()
75 operator delete[](break_optimization(new S12_128[100]), std::nothrow); in main()
/llvm-project-15.0.7/compiler-rt/lib/asan/
H A Dasan_new_delete.cpp72 #define OPERATOR_NEW_BODY(type, nothrow) \ argument
75 if (!nothrow && UNLIKELY(!res)) \
78 #define OPERATOR_NEW_BODY_ALIGN(type, nothrow) \ argument
81 if (!nothrow && UNLIKELY(!res)) \
/llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/bugprone/
H A Dunhandled-exception-at-new.cpp10 extern const nothrow_t nothrow;
117 int *I1 = new (std::nothrow) int; in f_new_nothrow()
118 int *I2 = new (static_cast<std::align_val_t>(1), std::nothrow) int; in f_new_nothrow()
/llvm-project-15.0.7/clang/test/CodeGen/
H A Daddress-sanitizer-and-array-cookie.cpp8 std::nothrow_t nothrow; variable
31 return new (std::nothrow) C[10]; in CallNewNoThrow()
/llvm-project-15.0.7/clang/lib/Headers/openmp_wrappers/
H A Dtime.h18 #define __DEVICE__ static constexpr __attribute__((always_inline, nothrow))
20 #define __DEVICE__ static __attribute__((always_inline, nothrow))
/llvm-project-15.0.7/clang/test/AST/
H A Dast-dump-openmp-begin-declare-variant_10.c31 __attribute__((nothrow)) int also_before3(void) { in also_before3()
34 static CONST __attribute__((nothrow, always_inline)) __inline__ int also_before4(void) { in also_before4()

12345