mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
C++: Add test with missing result.
This commit is contained in:
@@ -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&) { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user