mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
C++: Call noexcept constructor instead.
This commit is contained in:
@@ -202,7 +202,7 @@ void bad_new_with_nonthrowing_call() {
|
||||
|
||||
try {
|
||||
int* p2 = new(std::nothrow) int; // GOOD: boolean conversion constructor might throw
|
||||
Foo f(12);
|
||||
Foo f;
|
||||
if(f) { }
|
||||
} catch(...) { }
|
||||
}
|
||||
Reference in New Issue
Block a user