From 175fdbb1051759e1336971f8aadbc2d6dc51841b Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Mon, 31 May 2021 09:54:24 +0200 Subject: [PATCH] C++: Replace exists(not ...) with not exists(...). --- .../CWE/CWE-570/IncorrectAllocationErrorHandling.ql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/ql/src/Security/CWE/CWE-570/IncorrectAllocationErrorHandling.ql b/cpp/ql/src/Security/CWE/CWE-570/IncorrectAllocationErrorHandling.ql index 777da533560..b06df90c860 100644 --- a/cpp/ql/src/Security/CWE/CWE-570/IncorrectAllocationErrorHandling.ql +++ b/cpp/ql/src/Security/CWE/CWE-570/IncorrectAllocationErrorHandling.ql @@ -178,11 +178,11 @@ class ThrowingAllocator extends Function { // // So we say an allocator might throw if: // 1. It doesn't have a body - // 2. there is a parameter that is not `nothrow` + // 2. there isn't a parameter with type `nothrow_t` // 3. the allocator isn't marked with `throw()` or `noexcept`. not exists(this.getBlock()) and - exists(Parameter p | p = this.getAParameter() | - not p.getUnspecifiedType() instanceof NoThrowType + not exists(Parameter p | p = this.getAParameter() | + p.getUnspecifiedType() instanceof NoThrowType ) and not this.isNoExcept() and not this.isNoThrow()