Skip to content

Commit 725122d

Browse files
committed
C++: Replace toString logic.
1 parent 9d52db3 commit 725122d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/src/experimental/Security/CWE/CWE-570/WrongInDetectingAndHandlingMemoryAllocationErrors.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class WrongCheckErrorOperatorNew extends FunctionCall {
7474
/**
7575
* Holds if `(std::nothrow)` exists in call `operator new`.
7676
*/
77-
predicate isExistsNothrow() { this.getAChild().toString() = "nothrow" }
77+
predicate isExistsNothrow() { getTarget().isNoExcept() or getTarget().isNoThrow() }
7878
}
7979

8080
from WrongCheckErrorOperatorNew op

0 commit comments

Comments
 (0)