We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4107e35 commit 175fdbbCopy full SHA for 175fdbb
cpp/ql/src/Security/CWE/CWE-570/IncorrectAllocationErrorHandling.ql
@@ -178,11 +178,11 @@ class ThrowingAllocator extends Function {
178
//
179
// So we say an allocator might throw if:
180
// 1. It doesn't have a body
181
- // 2. there is a parameter that is not `nothrow`
+ // 2. there isn't a parameter with type `nothrow_t`
182
// 3. the allocator isn't marked with `throw()` or `noexcept`.
183
not exists(this.getBlock()) and
184
- exists(Parameter p | p = this.getAParameter() |
185
- not p.getUnspecifiedType() instanceof NoThrowType
+ not exists(Parameter p | p = this.getAParameter() |
+ p.getUnspecifiedType() instanceof NoThrowType
186
) and
187
not this.isNoExcept() and
188
not this.isNoThrow()
0 commit comments