Skip to content

Commit 2d5a263

Browse files
authored
Update FindIncorrectlyUsedExceptions.ql
1 parent 8aac5b3 commit 2d5a263

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cpp/ql/src/experimental/Security/CWE/CWE-703/FindIncorrectlyUsedExceptions.ql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,7 @@ where
4444
not fc instanceof ConstructorDirectInit and
4545
not fc.getEnclosingStmt() instanceof DeclStmt and
4646
not fc instanceof ConstructorDelegationInit and
47+
not fc.getParent() instanceof Initializer and
48+
not fc.getParent() instanceof AllocationExpr and
4749
msg = "This object does not generate an exception."
4850
select fc, msg

0 commit comments

Comments
 (0)