Home
last modified time | relevance | path

Searched full:exception (Results 1 – 25 of 14850) sorted by relevance

12345678910>>...594

/llvm-project/clang-tools-extra/test/clang-tidy/checkers/hicpp/
H A Dexception-baseclass.cpp1 // RUN: %check_clang_tidy %s hicpp-exception-baseclass %t -- -- -fcxx-exceptions
4 class exception {}; class
5 class invalid_argument : public exception {};
8 class derived_exception : public std::exception {};
16 class bad_inheritance : private std::exception {};
17 class no_good_inheritance : protected std::exception {};
18 class really_creative : public non_derived_exception, private std::exception {};
24 …-NOTES: [[@LINE-1]]:11: warning: throwing an exception whose type 'int' is not derived from 'std:: in problematic()
28 …K-NOTES: [[@LINE-1]]:9: warning: throwing an exception whose type 'int' is not derived from 'std:: in problematic()
32 …-NOTES: [[@LINE-1]]:11: warning: throwing an exception whose type 'int' is not derived from 'std:: in problematic()
[all …]
/llvm-project/clang-tools-extra/docs/clang-tidy/checks/bugprone/
H A Dempty-catch.rst11 // Some code that can throw an exception
12 } catch(const std::exception&) {
17 that are thrown during program execution. When an exception is thrown, the
19 exception.
22 exception but do nothing with it. This means that the exception is not handled
26 * *Hidden Bugs*: If an exception is caught and ignored, it can lead to hidden
45 This means either fixing the underlying issue that caused the exception or
46 propagating the exception up the call stack to a higher-level handler.
47 If an exception is not important, it should still be logged or reported in
50 If the exception is something that can be handled locally, then it should be
[all …]
H A Dunhandled-exception-at-new.rst1 .. title:: clang-tidy - bugprone-unhandled-exception-at-new
3 bugprone-unhandled-exception-at-new
6 Finds calls to ``new`` with missing exception handler for ``std::bad_alloc``.
10 used. The check verifies that the exception is handled in the function
13 If a nonthrowing version is used or the exception is allowed to propagate out
16 The exception handler is checked if it catches a ``std::bad_alloc`` or
17 ``std::exception`` exception type, or all exceptions (catch-all).
19 ``noexcept`` or may throw an exception of type ``std::bad_alloc`` (or one
20 derived from it). Other exception class types are not taken into account.
25 int *p = new int[1000]; // warning: missing exception handler for allocation failure at 'new'
[all …]
/llvm-project/llvm/docs/
H A DExceptionHandling.rst2 Exception Handling in LLVM
12 exception handling in LLVM. It describes the format that LLVM exception
15 provides specific examples of what exception handling information is used for in
18 Itanium ABI Zero-cost Exception Handling
21 Exception handling for most programming languages is designed to recover from
23 exception handling should not interfere with the main flow of an application's
27 The Itanium ABI Exception Handling Specification defines a methodology for
28 providing outlying data in the form of exception tables without inlining
29 speculative exception handlin
[all...]
/llvm-project/llvm/unittests/ObjectYAML/
H A DMinidumpYAMLTest.cpp5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
149 - Type: Exception in TEST()
151 Exception Record: in TEST()
152 Exception Code: 0x23 in TEST()
153 Exception Flags: 0x5 in TEST()
154 Exception Record: 0x0102030405060708 in TEST()
155 Exception Address: 0x0a0b0c0d0e0f1011 in TEST()
173 const minidump::Exception &Exception = Stream.ExceptionRecord; in TEST()
174 EXPECT_EQ(0x23u, Exception in TEST()
172 const minidump::Exception &Exception = Stream.ExceptionRecord; TEST() local
215 const minidump::Exception &Exception = Stream.ExceptionRecord; TEST() local
271 const minidump::Exception &Exception = Stream.ExceptionRecord; TEST() local
322 const minidump::Exception &Exception = Stream.ExceptionRecord; TEST() local
[all...]
/llvm-project/libcxx/include/__exception/
H A Dexception.h5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
14 // <vcruntime_exception.h> defines its own std::exception and std::bad_exception types,
27 // The std::exception class was already included above, but we're explicit about this condition her…
30 // However, <vcruntime_exception.h> does not define std::exception and std::bad_exception
33 // Since libc++ still wants to provide the std::exception hierarchy even when _HAS_EXCEPTIONS == 0
35 // of the VCRuntime std::exception and std::bad_exception types in that mode.
42 class exception { // base of all library exceptions
44 exception() _NOEXCEPT : __data_() {}
46 explicit exception(char const* __message) _NOEXCEPT : __data_() {
51 exception(exception const&) _NOEXCEPT {}
[all …]
/llvm-project/polly/lib/External/isl/cpp/
H A Dcpp.h.top82 class exception : public std::exception {
86 inline exception(const char *what_arg, const char *msg,
89 exception() {}
90 exception(const char *what_arg) {
103 * will be included in the exception thrown from inside the bindings.
106 /* Wrapper for throwing an exception with the given message.
114 /* Create an exception of a type described by "what_arg", with
121 exception::exception(const char *what_arg, const char *msg, const char *file,
131 class exception_abort : public exception {
132 friend exception;
[all …]
/llvm-project/libcxxabi/src/
H A Dcxa_exception.cpp5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 // This file implements the "Exception Handling APIs"
15 #include <exception> // for std::terminate
58 // Get the exception object from the unwind pointer.
60 // front of the user's exception object
115 static inline int incrementHandlerCount(__cxa_exception *exception) { in incrementHandlerCount() argument
116 return ++exception->handlerCount; in incrementHandlerCount()
120 static inline int decrementHandlerCount(__cxa_exception *exception) { in decrementHandlerCount() argument
121 return --exception->handlerCount; in decrementHandlerCount()
127 exc is called, and then the memory for the exception is deallocated.
[all …]
/llvm-project/clang-tools-extra/test/clang-tidy/checkers/bugprone/
H A Dexception-escape.cpp1 // RUN: %check_clang_tidy -std=c++11,c++14 %s bugprone-exception-escape %t -- \
3 // RUN: bugprone-exception-escape.IgnoredExceptions: 'ignored1,ignored2', \
4 // RUN: bugprone-exception-escape.FunctionsThatShouldNotThrow: 'enabled1,enabled2,enabled3' \
11 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: an exception may be thrown in function '~throwing_destructor' which should not throw exceptions in ~throwing_destructor()
18 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: an exception may be thrown in function 'throwing_move_constructor' which should not throw exceptions in throwing_move_constructor()
25 // CHECK-MESSAGES: :[[@LINE-1]]:29: warning: an exception may be thrown in function 'operator=' which should not throw exceptions in operator =()
31 // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: an exception may be thrown in function 'throwing_noexcept' which should not throw exceptions in throwing_noexcept()
36 // CHECK-MESSAGES-NOT: :[[@LINE-1]]:6: warning: an exception may be thrown in function 'throw_and_catch' which should not throw exceptions in throw_and_catch()
44 // CHECK-MESSAGES: :[[@LINE-1]]:6: warning: an exception may be thrown in function 'throw_and_catch_some' which should not throw exceptions in throw_and_catch_some()
53 // CHECK-MESSAGES-NOT: :[[@LINE-1]]:6: warning: an exception ma in throw_and_catch_each()
[all...]
H A Dmultiple-new-in-one-expression.cpp7 class exception {}; class
8 class bad_alloc : public exception {};
54 …ion may leak if an other allocation is sequenced after it and throws an exception; order of these … in test_function_parameter()
56 …g: memory allocation may leak if an other allocation is sequenced after it and throws an exception; in test_function_parameter()
58 …g: memory allocation may leak if an other allocation is sequenced after it and throws an exception; in test_function_parameter()
60 …g: memory allocation may leak if an other allocation is sequenced after it and throws an exception; in test_function_parameter()
62 …g: memory allocation may leak if an other allocation is sequenced after it and throws an exception; in test_function_parameter()
65 …g: memory allocation may leak if an other allocation is sequenced after it and throws an exception; in test_function_parameter()
68 …g: memory allocation may leak if an other allocation is sequenced after it and throws an exception; in test_function_parameter()
70 …g: memory allocation may leak if an other allocation is sequenced after it and throws an exception; in test_function_parameter()
[all …]
H A Dthrow-keyword-missing.cpp22 // std::exception and std::runtime_error declaration.
23 struct exception { struct
24 exception();
25 exception(const exception &other);
26 virtual ~exception();
29 struct runtime_error : public exception {
38 // Class name contains the substring "exception", in certain cases using this class should emit a warning.
50 // CHECK-MESSAGES: :[[@LINE+1]]:5: warning: suspicious exception object created but not thrown; did you mean 'throw {{.*}}'? [bugprone-throw-keyword-missing] in stdExceptionNotTrownTest()
51 std::exception(); in stdExceptionNotTrownTest()
[all...]
/llvm-project/llvm/test/Analysis/ScalarEvolution/
H A Dpointer-sign-bits.ll23 end: ; preds = %"no exception block35"
48 br i1 %arg, label %"no exception block13", label %verifyNullCont12.end_crit_edge
53 "no exception block13": ; preds = %verifyNullCont12
56 verifyNullExit14: ; preds = %"no exception block13"
59 verifyNullCont15: ; preds = %"no exception block13"
60 br i1 %arg, label %"no exception block16", label %verifyNullCont15.end_crit_edge
65 "no exception block16": ; preds = %verifyNullCont15
68 verifyNullExit17: ; preds = %"no exception block16"
71 verifyNullCont18: ; preds = %"no exception block16"
72 br i1 %arg, label %"no exception block1
[all...]
/llvm-project/clang/test/Frontend/
H A Dwindows-exceptions.cpp2 // RUN: not %clang_cc1 -triple i686--windows-msvc -fsyntax-only -exception-model=dwarf %s 2>&1 | Fi…
3 // RUN: not %clang_cc1 -triple i686--windows-msvc -fsyntax-only -exception-model=seh %s 2>&1 | File…
4 // RUN: not %clang_cc1 -triple i686--windows-msvc -fsyntax-only -exception-model=sjlj %s 2>&1 | Fil…
7 // RUN: not %clang_cc1 -triple x86_64--windows-msvc -fsyntax-only -exception-model=dwarf %s 2>&1 | …
8 // RUN: not %clang_cc1 -triple x86_64--windows-msvc -fsyntax-only -exception-model=seh %s 2>&1 | Fi…
9 // RUN: not %clang_cc1 -triple x86_64--windows-msvc -fsyntax-only -exception-model=sjlj %s 2>&1 | F…
12 // RUN: %clang_cc1 -triple i686--windows-gnu -fsyntax-only -exception-model=dwarf %s
13 // RUN: %clang_cc1 -triple i686--windows-gnu -fsyntax-only -exception-model=seh %s
14 // RUN: %clang_cc1 -triple i686--windows-gnu -fsyntax-only -exception-model=sjlj %s
17 // RUN: %clang_cc1 -triple x86_64--windows-gnu -fsyntax-only -exception-model=dwarf %s
[all …]
/llvm-project/llvm/docs/HistoricalNotes/
H A D2001-05-18-ExceptionHandling.txt1 Meeting notes: Implementation idea: Exception Handling in C++/Java
20 an exception is thrown by func (or if we are in a try block).
57 used to implement the C++ exception model:
70 // execution continues after the try block: the exception is consumed
73 throw; // Exception is propagated
86 call foo() with fooCleanup // An exception in foo is propagated to fooCleanup
87 call bar() with barCleanup // An exception in bar is propagated to barCleanup
93 call baz() with bazCleanup // An exception in baz is propagated to bazCleanup
102 what we want for zero cost (when unused) exception handling. Especially on
103 platforms with many registers (ie, the IA64) setjmp/longjmp style exception
[all...]
/llvm-project/clang/test/SemaCXX/
H A Dwarn-throw-out-noexcept-func.cpp5 A_ShouldDiag::~A_ShouldDiag() { // expected-note {{destructor has a implicit non-throwing exception in ~A_ShouldDiag()
6 throw 1; // expected-warning {{has a non-throwing exception specification but can still throw}} in ~A_ShouldDiag()
14 …~R_ShouldDiag() { // expected-note {{destructor has a implicit non-throwing exception specificati… in ~R_ShouldDiag()
15 throw 1; // expected-warning {{has a non-throwing exception specification but}} in ~R_ShouldDiag()
18 throw 1;// expected-warning {{has a non-throwing exception specification but}} in R_ShouldDiag()
21 throw 1; // expected-warning {{has a non-throwing exception specification but}} in SomeThrow()
24 throw 1; // expected-warning {{has a non-throwing exception specification but}} in SomeDeclspecThrow()
42 …ShouldDiag() { // expected-note {{destructor has a implicit non-throwing exception specification}} in ~N_ShouldDiag()
43 throw 1; // expected-warning {{has a non-throwing exception specification but}} in ~N_ShouldDiag()
47 ~X_ShouldDiag() noexcept { // expected-note {{destructor has a non-throwing exception}} in ~X_ShouldDiag()
[all …]
/llvm-project/clang/test/Templight/
H A Dtemplight-exception-spec-func.cpp12 // CHECK: {{^orig:[ ]+'.*templight-exception-spec-func.cpp:3:6'}} in main()
13 // CHECK: {{^poi:[ ]+'.*templight-exception-spec-func.cpp:72:3'$}} in main()
18 // CHECK: {{^orig:[ ]+'.*templight-exception-spec-func.cpp:3:6'}} in main()
19 // CHECK: {{^poi:[ ]+'.*templight-exception-spec-func.cpp:72:3'$}} in main()
25 // CHECK: {{^orig:[ ]+'.*templight-exception-spec-func.cpp:3:6'}} in main()
26 // CHECK: {{^poi:[ ]+'.*templight-exception-spec-func.cpp:72:3'$}} in main()
31 // CHECK: {{^orig:[ ]+'.*templight-exception-spec-func.cpp:3:6'}} in main()
32 // CHECK: {{^poi:[ ]+'.*templight-exception-spec-func.cpp:72:3'$}} in main()
38 // CHECK: {{^orig:[ ]+'.*templight-exception-spec-func.cpp:3:6'}} in main()
39 // CHECK: {{^poi:[ ]+'.*templight-exception-spec-func.cpp:72:3'$}} in main()
[all …]
/llvm-project/llvm/lib/Target/WebAssembly/
H A DWebAssemblyExceptionInfo.cpp1 //===--- WebAssemblyExceptionInfo.cpp - Exception Infomation --------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
28 #define DEBUG_TYPE "wasm-exception-info"
33 "WebAssembly Exception Information", true, true)
37 "WebAssembly Exception Information", true, true) in INITIALIZE_PASS_DEPENDENCY()
40 LLVM_DEBUG(dbgs() << "********** Exception Info Calculation **********\n" in INITIALIZE_PASS_DEPENDENCY()
93 // which means, if an exception is not caught by the catchpad, it should end in recalculate()
100 // ... // this catch (int) { ... } is grouped as an exception in recalculate()
106 // unwind destination is in the outside of the catchpad's exception. in recalculate()
110 // children outside of the exception, tha in recalculate()
[all...]
/llvm-project/clang-tools-extra/test/clang-tidy/checkers/cert/
H A Dstatic-object-exception.cpp60 …arning: initialization of 's' with static storage duration may throw an exception that cannot be c…
65 …arning: initialization of 'u' with static storage duration may throw an exception that cannot be c…
69 …arning: initialization of 'v' with static storage duration may throw an exception that cannot be c…
73 …arning: initialization of 'w' with static storage duration may throw an exception that cannot be c…
77 …rning: initialization of 'x1' with static storage duration may throw an exception that cannot be c…
81 …rning: initialization of 'x2' with static storage duration may throw an exception that cannot be c…
85 …arning: initialization of 'y' with static storage duration may throw an exception that cannot be c…
91 …arning: initialization of 'i' with static storage duration may throw an exception that cannot be c…
95 …arning: initialization of 'j' with static storage duration may throw an exception that cannot be c…
100 …arning: initialization of 'l' with static storage duration may throw an exception that cannot be c…
[all …]
/llvm-project/clang-tools-extra/test/clang-tidy/checkers/modernize/
H A Duse-noexcept-opt.cpp4 // This test is not run in C++17 or later because dynamic exception
12 // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: dynamic exception specification 'throw()' is deprecate…
16 // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: dynamic exception specification 'throw(...)' is deprec…
20 // CHECK-MESSAGES: :[[@LINE-1]]:10: warning: dynamic exception specification 'throw(int(int))' is d…
26 // CHECK-MESSAGES: :[[@LINE-2]]:53: warning: dynamic exception specification 'throw (int)' is depre…
30 // CHECK-MESSAGES: :[[@LINE-2]]:15: warning: dynamic exception specification 'throw(A, B)' is depre…
34 // CHECK-MESSAGES: :[[@LINE-1]]:32: warning: dynamic exception specification 'throw(A, B)' is depre…
38 // CHECK-MESSAGES: :[[@LINE-1]]:25: warning: dynamic exception specification 'throw()' is deprecate…
42 // CHECK-MESSAGES: :[[@LINE-1]]:25: warning: dynamic exception specification 'throw(int)' is deprec…
43 // CHECK-MESSAGES: :[[@LINE-2]]:37: warning: dynamic exception specification 'throw(char)' is depre…
[all …]
H A Duse-noexcept.cpp2 // This test is not run in C++17 or later because dynamic exception
9 // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: dynamic exception specification 'throw()' is deprecate…
15 // CHECK-MESSAGES: :[[@LINE-2]]:12: warning: dynamic exception specification 'throw()' is deprecate…
19 // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: dynamic exception specification 'throw(...)' is deprec…
23 // CHECK-MESSAGES: :[[@LINE-1]]:10: warning: dynamic exception specification 'throw(int(int))' is d…
28 // CHECK-MESSAGES: :[[@LINE-2]]:15: warning: dynamic exception specification 'throw(A, B)' is depre…
32 // CHECK-MESSAGES: :[[@LINE-1]]:32: warning: dynamic exception specification 'throw(A, B)' is depre…
36 // CHECK-MESSAGES: :[[@LINE-1]]:25: warning: dynamic exception specification 'throw()' is deprecate…
40 // CHECK-MESSAGES: :[[@LINE-1]]:25: warning: dynamic exception specification 'throw(int)' is deprec…
41 // CHECK-MESSAGES: :[[@LINE-2]]:37: warning: dynamic exception specification 'throw(char)' is depre…
[all …]
/llvm-project/libc/test/src/fenv/
H A Denabled_exceptions_test.cpp5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
26 // This test enables an exception and verifies that raising that exception
35 // exception and reading back to see if the exception got enabled. If the in TEST_F()
36 // exception did not get enabled, then it means that the HW does not support in TEST_F()
42 #endif // Architectures where exception trapping is not supported in TEST_F()
44 // TODO: Install a floating point exception handler and verify that the in TEST_F()
45 // the expected exception was raised. One will have to longjmp back from in TEST_F()
46 // that exception handler, so such a testing can be done after we have in TEST_F()
54 // SIGFPE handler. They should set the exception flag though, in TEST_F()
57 // exception flags when FE_INEXACT is enabled. in TEST_F()
[all …]
/llvm-project/clang/test/CodeGenObjCXX/
H A Dpersonality.mm2 // RUN: %clang_cc1 -triple i686-unknown-linux-gnu -fexceptions -exception-model=dwarf -fobjc-except…
3 // RUN: %clang_cc1 -triple i686-unknown-linux-gnu -fexceptions -exception-model=seh -fobjc-exceptio…
4 // RUN: %clang_cc1 -triple i686-unknown-linux-gnu -fexceptions -exception-model=sjlj -fobjc-excepti…
6 // RUN: %clang_cc1 -triple i686-unknown-linux-gnu -fexceptions -exception-model=dwarf -fobjc-except…
7 // RUN: %clang_cc1 -triple i686-unknown-linux-gnu -fexceptions -exception-model=seh -fobjc-exceptio…
8 // RUN: %clang_cc1 -triple i686-unknown-linux-gnu -fexceptions -exception-model=sjlj -fobjc-excepti…
10 // RUN: %clang_cc1 -triple i686-unknown-linux-gnu -fexceptions -exception-model=dwarf -fobjc-except…
11 // RUN: %clang_cc1 -triple i686-unknown-linux-gnu -fexceptions -exception-model=seh -fobjc-exceptio…
12 // RUN: %clang_cc1 -triple i686-unknown-linux-gnu -fexceptions -exception-model=sjlj -fobjc-excepti…
14 // RUN: %clang_cc1 -triple i686-unknown-linux-gnu -fexceptions -exception-model=dwarf -fobjc-except…
[all …]
/llvm-project/clang/test/CXX/except/except.spec/
H A Dp4.cpp3 // We permit overriding an implicit exception specification with an explicit one
13 …function previously declared with an implicit exception specification redeclared with an explicit in ~S()
14 …function previously declared with an implicit exception specification redeclared with an explicit in operator delete()
22 void T::a() {} // expected-error {{missing exception specification 'noexcept'}} in a()
23 …function previously declared with an explicit exception specification redeclared with an implicit in ~T()
24 …function previously declared with an explicit exception specification redeclared with an implicit in operator delete()
35 template<typename T> U<T>::~U() noexcept(true) {} // expected-error {{exception specification in de… in ~U()
36 …oid U<T>::operator delete(void*) noexcept(false) {} // expected-error {{exception specification in… in operator delete()
/llvm-project/libcxxabi/test/
H A Dexception_object_alignment.2.pass.cpp5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
12 // about the alignment of the exception (only in that specific case, of
16 // aligned exception even when back-deploying to older Darwin systems where
19 struct exception { struct
20 exception() : x(0) { } in exception() function
21 exception(const exception&) = default;
22 exception& operator=(const exception&) = default;
23 virtual ~exception() { } in ~exception() argument
27 struct foo : exception { }; argument
/llvm-project/clang/test/OpenMP/
H A Dnvptx_exceptions.cpp5 * -Wopenmp-target-exception no matter what combination of -fexceptions and
10 …p-is-target-device -fcxx-exceptions -fexceptions %s -verify=with -Wopenmp-target-exception -analyze
11 …p-is-target-device -fcxx-exceptions -fexceptions %s -verify=with -Wopenmp-target-exception -analyze
12 …e nvptx64 -fopenmp-is-target-device -fexceptions %s -verify=with -Wopenmp-target-exception -analyze
13 …openmp -triple nvptx64 -fopenmp-is-target-device %s -verify=with -Wopenmp-target-exception -analyze
17 * -Wno-openmp-target-exception no matter the combination of -fexceptions and
21 …arget-device -fcxx-exceptions -fexceptions %s -verify=without -Wno-openmp-target-exception -analyze
22 …-fopenmp-is-target-device -fcxx-exceptions %s -verify=without -Wno-openmp-target-exception -analyze
23 …x64 -fopenmp-is-target-device -fexceptions %s -verify=without -Wno-openmp-target-exception -analyze
24 … -triple nvptx64 -fopenmp-is-target-device %s -verify=without -Wno-openmp-target-exception -analyze
[all …]

12345678910>>...594