@@ -71,7 +71,7 @@ private predicate locationSortKeys(Locatable ast, string file, int line, int col
71
71
)
72
72
}
73
73
74
- private Declaration getEnclosingDeclaration ( Locatable ast ) {
74
+ private Declaration getAnEnclosingDeclaration ( Locatable ast ) {
75
75
result = ast .( Expr ) .getEnclosingFunction ( )
76
76
or
77
77
result = ast .( Stmt ) .getEnclosingFunction ( )
@@ -92,7 +92,7 @@ private Declaration getEnclosingDeclaration(Locatable ast) {
92
92
* nodes for things like parameter lists and constructor init lists.
93
93
*/
94
94
private newtype TPrintAstNode =
95
- TAstNode ( Locatable ast ) { shouldPrintDeclaration ( getEnclosingDeclaration ( ast ) ) } or
95
+ TAstNode ( Locatable ast ) { shouldPrintDeclaration ( getAnEnclosingDeclaration ( ast ) ) } or
96
96
TDeclarationEntryNode ( DeclStmt stmt , DeclarationEntry entry ) {
97
97
// We create a unique node for each pair of (stmt, entry), to avoid having one node with
98
98
// multiple parents due to extractor bug CPP-413.
@@ -655,7 +655,7 @@ class FunctionNode extends FunctionOrGlobalOrNamespaceVariableNode {
655
655
}
656
656
657
657
private string getChildAccessorWithoutConversions ( Locatable parent , Element child ) {
658
- shouldPrintDeclaration ( getEnclosingDeclaration ( parent ) ) and
658
+ shouldPrintDeclaration ( getAnEnclosingDeclaration ( parent ) ) and
659
659
(
660
660
exists ( Stmt s | s = parent |
661
661
namedStmtChildPredicates ( s , child , result )
@@ -674,7 +674,7 @@ private string getChildAccessorWithoutConversions(Locatable parent, Element chil
674
674
}
675
675
676
676
private predicate namedStmtChildPredicates ( Locatable s , Element e , string pred ) {
677
- shouldPrintDeclaration ( getEnclosingDeclaration ( s ) ) and
677
+ shouldPrintDeclaration ( getAnEnclosingDeclaration ( s ) ) and
678
678
(
679
679
exists ( int n | s .( BlockStmt ) .getStmt ( n ) = e and pred = "getStmt(" + n + ")" )
680
680
or
0 commit comments