C++: Add test with missing result.

This commit is contained in:
Mathias Vorreiter Pedersen
2021-05-06 16:56:11 +02:00
parent 47a419a5f1
commit 7b8a51f995

View File

@@ -205,4 +205,10 @@ void bad_new_with_nonthrowing_call() {
Foo f;
if(f) { }
} catch(...) { }
}
}
void bad_new_catch_baseclass_of_bad_alloc() {
try {
int* p = new(std::nothrow) int; // BAD [NOT DETECTED]
} catch(const std::exception&) { }
}