| /llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/bugprone/ |
| H A D | unhandled-exception-at-new.cpp | 7 class bad_alloc : public exception {}; class 18 typedef std::bad_alloc badalloc1; 19 using badalloc2 = std::bad_alloc; 20 using badalloc3 = std::bad_alloc &; 41 } catch (std::bad_alloc) { in f1() 46 } catch (std::bad_alloc &) { in f1() 51 } catch (const std::bad_alloc &) { in f1() 82 } catch (std::bad_alloc *) { in f1() 96 } catch (std::bad_alloc) { in f2() 171 } catch (const std::bad_alloc &) { in f_try() [all …]
|
| H A D | exception-escape.cpp | 213 class bad_alloc {}; class 217 throw std::bad_alloc(); in alloc()
|
| /llvm-project-15.0.7/libcxxabi/src/ |
| H A D | stdlib_exception.cpp | 40 bad_alloc::bad_alloc() noexcept in bad_alloc() function in std::bad_alloc 44 bad_alloc::~bad_alloc() noexcept in ~bad_alloc() 49 bad_alloc::what() const noexcept in what()
|
| H A D | stdlib_new_delete.cpp | 39 throw std::bad_alloc(); in operator new() 159 throw std::bad_alloc(); in operator new()
|
| /llvm-project-15.0.7/libcxx/test/std/language.support/support.dynamic/alloc.errors/bad.alloc/ |
| H A D | bad_alloc.pass.cpp | 19 static_assert((std::is_base_of<std::exception, std::bad_alloc>::value), in main() 21 static_assert(std::is_polymorphic<std::bad_alloc>::value, in main() 23 std::bad_alloc b; in main() 24 std::bad_alloc b2 = b; in main()
|
| /llvm-project-15.0.7/libcxx/src/support/runtime/ |
| H A D | exception_fallback.ipp | 102 bad_alloc::bad_alloc() noexcept 106 bad_alloc::~bad_alloc() noexcept 111 bad_alloc::what() const noexcept 113 return "std::bad_alloc";
|
| H A D | exception_msvc.ipp | 134 bad_alloc::bad_alloc() noexcept 138 bad_alloc::~bad_alloc() noexcept 143 bad_alloc::what() const noexcept 145 return "std::bad_alloc";
|
| H A D | exception_glibcxx.ipp | 16 bad_alloc::bad_alloc() noexcept
|
| /llvm-project-15.0.7/clang/test/CXX/basic/basic.stc/basic.stc.dynamic/ |
| H A D | p2.cpp | 19 class bad_alloc { }; class 24 void* operator new(std::size_t) throw(std::bad_alloc); 28 void* operator new[](std::size_t) throw(std::bad_alloc);
|
| H A D | p2-noexceptions.cpp | 6 class bad_alloc { }; class
|
| /llvm-project-15.0.7/clang-tools-extra/docs/clang-tidy/checks/bugprone/ |
| H A D | unhandled-exception-at-new.rst | 6 Finds calls to ``new`` with missing exception handler for ``std::bad_alloc``. 8 Calls to ``new`` may throw exceptions of type ``std::bad_alloc`` that should 16 The exception handler is checked if it catches a ``std::bad_alloc`` or 19 ``noexcept`` or may throw an exception of type ``std::bad_alloc`` (or one 44 } catch (std::bad_alloc &) {
|
| /llvm-project-15.0.7/clang/test/CXX/except/except.spec/ |
| H A D | p3.cpp | 100 extern "C++" { namespace std { class bad_alloc {}; } } class 102 void* operator new(mysize_t) throw(std::bad_alloc); 105 void* operator new[](mysize_t) throw(std::bad_alloc);
|
| /llvm-project-15.0.7/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/ |
| H A D | F.pass.cpp | 31 void* operator new(std::size_t s) TEST_THROW_SPEC(std::bad_alloc) in operator new() 35 if (expected == 0) TEST_THROW(std::bad_alloc()); in operator new() 144 } catch (std::bad_alloc const&) { in test_throwing_new_during_thread_creation() 189 catch (std::bad_alloc const&) in main()
|
| /llvm-project-15.0.7/libcxx/include/ |
| H A D | new | 19 class bad_alloc 23 bad_alloc() noexcept; 24 bad_alloc(const bad_alloc&) noexcept; 25 bad_alloc& operator=(const bad_alloc&) noexcept; 29 class bad_array_new_length : public bad_alloc // C++14 127 class _LIBCPP_EXCEPTION_ABI bad_alloc 131 bad_alloc() _NOEXCEPT; 132 virtual ~bad_alloc() _NOEXCEPT; 137 : public bad_alloc 184 #define _THROW_BAD_ALLOC throw(std::bad_alloc)
|
| /llvm-project-15.0.7/libcxx/src/ |
| H A D | new.cpp | 42 throw bad_alloc(); in __throw_bad_alloc() 76 throw std::bad_alloc(); in operator new() 196 throw std::bad_alloc(); in operator new()
|
| /llvm-project-15.0.7/libcxx/test/std/strings/basic.string/string.capacity/ |
| H A D | max_size.pass.cpp | 34 catch ( const std::bad_alloc & ) { return ; } in test1() 45 catch ( const std::bad_alloc & ) { return ; } in test2()
|
| /llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/openmp/ |
| H A D | exception-escape.cpp | 10 class bad_alloc {}; class 36 throw std::bad_alloc(); in ignore_alloc()
|
| /llvm-project-15.0.7/libcxx/test/support/ |
| H A D | count_new.h | 27 throw std::bad_alloc(); in throw_bad_alloc_helper() 361 void* operator new(std::size_t s) TEST_THROW_SPEC(std::bad_alloc) in new() 376 void* operator new[](std::size_t s) TEST_THROW_SPEC(std::bad_alloc) in TEST_THROW_SPEC() argument 394 void* operator new(std::size_t s, std::align_val_t av) TEST_THROW_SPEC(std::bad_alloc) { in new() 420 void* operator new[](std::size_t s, std::align_val_t av) TEST_THROW_SPEC(std::bad_alloc) { in TEST_THROW_SPEC() argument
|
| /llvm-project-15.0.7/libcxx/test/std/strings/basic.string/string.cons/ |
| H A D | copy_alloc.pass.cpp | 32 throw std::bad_alloc(); in allocate() 73 catch ( std::bad_alloc &) { return; } in test_assign()
|
| /llvm-project-15.0.7/clang/test/CXX/drs/ |
| H A D | dr412.cpp | 12 namespace std { struct bad_alloc {}; } struct
|
| /llvm-project-15.0.7/libcxx/test/std/language.support/support.dynamic/alloc.errors/new.badlength/ |
| H A D | bad_array_new_length.pass.cpp | 19 static_assert((std::is_base_of<std::bad_alloc, std::bad_array_new_length>::value), in main()
|
| /llvm-project-15.0.7/libcxx/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/ |
| H A D | pbump2gig.pass.cpp | 42 catch (const std::bad_alloc &) {} // maybe we don't have enough RAM in main()
|
| /llvm-project-15.0.7/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/ |
| H A D | nullptr_t_deleter_throw.pass.cpp | 48 catch (std::bad_alloc&) in main()
|
| H A D | pointer_throw.pass.cpp | 49 catch (std::bad_alloc&) in main()
|
| /llvm-project-15.0.7/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/ |
| H A D | new.pass.cpp | 47 catch (std::bad_alloc&) in main()
|