mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
26 lines
353 B
C++
26 lines
353 B
C++
namespace std {
|
|
struct exception {
|
|
virtual ~exception();
|
|
};
|
|
}
|
|
|
|
struct exn1 : std::exception { };
|
|
|
|
struct exn2 : std::exception { };
|
|
|
|
void bypass_catch() {
|
|
try {
|
|
throw exn1();
|
|
} catch (const exn2 &e) {
|
|
return;
|
|
}
|
|
}
|
|
|
|
void throw_from_nonstmt(int select) {
|
|
if (select) {
|
|
int x = (throw 1, 2);
|
|
} else {
|
|
({ throw 3; });
|
|
}
|
|
}
|