C++: Fix FP and accept test changes.

This commit is contained in:
Mathias Vorreiter Pedersen
2021-08-11 15:38:57 +02:00
parent c2b1da0010
commit 0d1884d7a6
2 changed files with 1 additions and 2 deletions

View File

@@ -182,7 +182,7 @@ class ThrowingAllocator extends Function {
// 3. the allocator isn't marked with `throw()` or `noexcept`.
not exists(this.getBlock()) and
not exists(Parameter p | p = this.getAParameter() |
p.getUnspecifiedType() instanceof NoThrowType
p.getUnspecifiedType().stripType() instanceof NoThrowType
) and
not this.isNoExcept() and
not this.isNoThrow()

View File

@@ -16,4 +16,3 @@
| test.cpp:151:9:151:24 | new | This allocation cannot throw. $@ is unnecessary. | test.cpp:152:15:152:18 | { ... } | This catch block |
| test.cpp:199:15:199:35 | new | This allocation cannot throw. $@ is unnecessary. | test.cpp:201:16:201:19 | { ... } | This catch block |
| test.cpp:212:14:212:34 | new | This allocation cannot throw. $@ is unnecessary. | test.cpp:213:34:213:36 | { ... } | This catch block |
| test.cpp:233:12:233:36 | new | This allocation cannot return null. $@ is unnecessary. | test.cpp:234:6:234:17 | ... == ... | This check |