C++: Avoid calling SwitchCase.getAStmt for performance reasons. This turns out to not be needed as the statements inside the switch case will get picked up by the BlockStmt.getAStmt case already.

This commit is contained in:
Mathias Vorreiter Pedersen
2021-05-07 11:18:50 +02:00
parent 856d512aa6
commit 08fa611700

View File

@@ -98,8 +98,6 @@ predicate stmtMayThrow(Stmt stmt) {
stmtMayThrow(switchStmt.getStmt())
)
or
stmtMayThrow(stmt.(SwitchCase).getAStmt())
or
// NOTE: We don't include `TryStmt` as those exceptions are not "observable" outside the function.
stmtMayThrow(stmt.(Handler).getBlock())
or