@@ -71,7 +71,7 @@ private predicate locationSortKeys(Locatable ast, string file, int line, int col
7171 )
7272}
7373
74- private Declaration getEnclosingDeclaration ( Locatable ast ) {
74+ private Declaration getAnEnclosingDeclaration ( Locatable ast ) {
7575 result = ast .( Expr ) .getEnclosingFunction ( )
7676 or
7777 result = ast .( Stmt ) .getEnclosingFunction ( )
@@ -92,7 +92,7 @@ private Declaration getEnclosingDeclaration(Locatable ast) {
9292 * nodes for things like parameter lists and constructor init lists.
9393 */
9494private newtype TPrintAstNode =
95- TAstNode ( Locatable ast ) { shouldPrintDeclaration ( getEnclosingDeclaration ( ast ) ) } or
95+ TAstNode ( Locatable ast ) { shouldPrintDeclaration ( getAnEnclosingDeclaration ( ast ) ) } or
9696 TDeclarationEntryNode ( DeclStmt stmt , DeclarationEntry entry ) {
9797 // We create a unique node for each pair of (stmt, entry), to avoid having one node with
9898 // multiple parents due to extractor bug CPP-413.
@@ -655,7 +655,7 @@ class FunctionNode extends FunctionOrGlobalOrNamespaceVariableNode {
655655}
656656
657657private string getChildAccessorWithoutConversions ( Locatable parent , Element child ) {
658- shouldPrintDeclaration ( getEnclosingDeclaration ( parent ) ) and
658+ shouldPrintDeclaration ( getAnEnclosingDeclaration ( parent ) ) and
659659 (
660660 exists ( Stmt s | s = parent |
661661 namedStmtChildPredicates ( s , child , result )
@@ -674,7 +674,7 @@ private string getChildAccessorWithoutConversions(Locatable parent, Element chil
674674}
675675
676676private predicate namedStmtChildPredicates ( Locatable s , Element e , string pred ) {
677- shouldPrintDeclaration ( getEnclosingDeclaration ( s ) ) and
677+ shouldPrintDeclaration ( getAnEnclosingDeclaration ( s ) ) and
678678 (
679679 exists ( int n | s .( BlockStmt ) .getStmt ( n ) = e and pred = "getStmt(" + n + ")" )
680680 or
0 commit comments