mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
C++: Simplify noThrowInTryBlock.
This commit is contained in:
@@ -182,9 +182,7 @@ class BadAllocCatchBlock extends CatchBlock {
|
||||
*/
|
||||
predicate noThrowInTryBlock(NewOrNewArrayExpr newExpr, BadAllocCatchBlock catchBlock) {
|
||||
exists(TryStmt try |
|
||||
forall(Expr cand | cand.getEnclosingBlock().getEnclosingBlock*() = try.getStmt() |
|
||||
not convertedExprMayThrow(cand)
|
||||
) and
|
||||
not stmtMayThrow(try.getStmt()) and
|
||||
try.getACatchClause() = catchBlock and
|
||||
newExpr.getEnclosingBlock().getEnclosingBlock*() = try.getStmt()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user