Skip to content

Commit 42b8f92

Browse files
committed
C++: Call noexcept constructor instead.
1 parent 6cdef78 commit 42b8f92

File tree

1 file changed

+1
-1
lines changed
  • cpp/ql/test/experimental/query-tests/Security/CWE/CWE-570/semmle/tests

1 file changed

+1
-1
lines changed

cpp/ql/test/experimental/query-tests/Security/CWE/CWE-570/semmle/tests/test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ void bad_new_with_nonthrowing_call() {
202202

203203
try {
204204
int* p2 = new(std::nothrow) int; // GOOD: boolean conversion constructor might throw
205-
Foo f(12);
205+
Foo f;
206206
if(f) { }
207207
} catch(...) { }
208208
}

0 commit comments

Comments
 (0)