diff --git a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedStmt.qll b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedStmt.qll index 83f19062b907..7dfebc56fe18 100644 --- a/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedStmt.qll +++ b/cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/TranslatedStmt.qll @@ -390,7 +390,7 @@ class TranslatedDeclStmt extends TranslatedStmt { override TranslatedElement getLastChild() { result = this.getChild(this.getChildCount() - 1) } - private int getChildCount() { result = count(this.getDeclarationEntry(_)) } + private int getChildCount() { result = count(int i | exists(this.getDeclarationEntry(i))) } IRDeclarationEntry getIRDeclarationEntry(int index) { result.hasIndex(index) and