| /llvm-project-15.0.7/clang/test/SemaCXX/ |
| H A D | nothrow-vs-exception-specs.cpp | 4 __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 D | nothrow-as-noexcept-ctor.cpp | 5 __attribute__((nothrow)) Base() {} in Base() 17 __attribute__((nothrow)) Derived2() = default; 21 __attribute__((nothrow)) Base3() {} in Base3() 25 __attribute__((nothrow)) Derived3() = default;
|
| H A D | unavailable_aligned_allocation.cpp | 18 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 D | implicit-exception-spec.cpp | 96 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 D | cxx-dynamic-memory-analysis-order.cpp | 68 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 D | NewDelete-custom.cpp | 12 void *operator new(std::size_t size, const std::nothrow_t ¬hrow) 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 D | new_delete_test.cpp | 18 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 D | hwasan_new_delete.cpp | 25 # 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 D | attr-nothrow.c | 9 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 D | swappable.pass.cpp | 237 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 D | new_faligned_allocation.pass.cpp | 59 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 D | aligned_alloc_availability.verify.cpp | 36 …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 D | err60-cpp.rst | 6 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 D | msan_new_delete.cpp | 33 #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 D | dfsan_new_delete.cpp | 30 #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 D | new.cpp | 25 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 D | catch-undef-behavior.cpp | 546 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 D | memprof_new_delete.cpp | 33 #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 D | temporary_buffer.h | 44 __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 D | aligned_delete_test.cpp | 16 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 D | asan_new_delete.cpp | 72 #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 D | unhandled-exception-at-new.cpp | 10 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 D | address-sanitizer-and-array-cookie.cpp | 8 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 D | time.h | 18 #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 D | ast-dump-openmp-begin-declare-variant_10.c | 31 __attribute__((nothrow)) int also_before3(void) { in also_before3() 34 static CONST __attribute__((nothrow, always_inline)) __inline__ int also_before4(void) { in also_before4()
|