mirror of
https://github.com/github/codeql.git
synced 2026-04-20 22:44:52 +02:00
C++: simplify TranslatedBlock::getLastChild
This commit is contained in:
@@ -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)) }
|
||||
|
||||
Reference in New Issue
Block a user