Home
last modified time | relevance | path

Searched refs:bad_alloc (Results 1 – 25 of 48) sorted by relevance

12

/llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/bugprone/
H A Dunhandled-exception-at-new.cpp7 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 Dexception-escape.cpp213 class bad_alloc {}; class
217 throw std::bad_alloc(); in alloc()
/llvm-project-15.0.7/libcxxabi/src/
H A Dstdlib_exception.cpp40 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 Dstdlib_new_delete.cpp39 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 Dbad_alloc.pass.cpp19 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 Dexception_fallback.ipp102 bad_alloc::bad_alloc() noexcept
106 bad_alloc::~bad_alloc() noexcept
111 bad_alloc::what() const noexcept
113 return "std::bad_alloc";
H A Dexception_msvc.ipp134 bad_alloc::bad_alloc() noexcept
138 bad_alloc::~bad_alloc() noexcept
143 bad_alloc::what() const noexcept
145 return "std::bad_alloc";
H A Dexception_glibcxx.ipp16 bad_alloc::bad_alloc() noexcept
/llvm-project-15.0.7/clang/test/CXX/basic/basic.stc/basic.stc.dynamic/
H A Dp2.cpp19 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 Dp2-noexceptions.cpp6 class bad_alloc { }; class
/llvm-project-15.0.7/clang-tools-extra/docs/clang-tidy/checks/bugprone/
H A Dunhandled-exception-at-new.rst6 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 Dp3.cpp100 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 DF.pass.cpp31 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 Dnew19 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 Dnew.cpp42 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 Dmax_size.pass.cpp34 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 Dexception-escape.cpp10 class bad_alloc {}; class
36 throw std::bad_alloc(); in ignore_alloc()
/llvm-project-15.0.7/libcxx/test/support/
H A Dcount_new.h27 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 Dcopy_alloc.pass.cpp32 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 Ddr412.cpp12 namespace std { struct bad_alloc {}; } struct
/llvm-project-15.0.7/libcxx/test/std/language.support/support.dynamic/alloc.errors/new.badlength/
H A Dbad_array_new_length.pass.cpp19 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 Dpbump2gig.pass.cpp42 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 Dnullptr_t_deleter_throw.pass.cpp48 catch (std::bad_alloc&) in main()
H A Dpointer_throw.pass.cpp49 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 Dnew.pass.cpp47 catch (std::bad_alloc&) in main()

12