Skip to content

Commit 175fdbb

Browse files
committed
C++: Replace exists(not ...) with not exists(...).
1 parent 4107e35 commit 175fdbb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cpp/ql/src/Security/CWE/CWE-570/IncorrectAllocationErrorHandling.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,11 @@ class ThrowingAllocator extends Function {
178178
//
179179
// So we say an allocator might throw if:
180180
// 1. It doesn't have a body
181-
// 2. there is a parameter that is not `nothrow`
181+
// 2. there isn't a parameter with type `nothrow_t`
182182
// 3. the allocator isn't marked with `throw()` or `noexcept`.
183183
not exists(this.getBlock()) and
184-
exists(Parameter p | p = this.getAParameter() |
185-
not p.getUnspecifiedType() instanceof NoThrowType
184+
not exists(Parameter p | p = this.getAParameter() |
185+
p.getUnspecifiedType() instanceof NoThrowType
186186
) and
187187
not this.isNoExcept() and
188188
not this.isNoThrow()

0 commit comments

Comments
 (0)