C++: simplify TranslatedBlock::getLastChild

This commit is contained in:
Robert Marsh
2024-02-13 00:46:53 +00:00
parent 7d8872bb99
commit b6cf64cff3

View File

@@ -674,7 +674,7 @@ class TranslatedBlock extends TranslatedStmt {
}
override TranslatedElement getLastChild() {
not this.isEmpty() and result = this.getStmt(this.getStmtCount() - 1)
result = this.getStmt(this.getStmtCount() - 1)
}
private predicate isEmpty() { not exists(stmt.getStmt(0)) }