Skip to content

Commit f25507e

Browse files
committed
Scope: Add a child scope accessor
1 parent 1bd839c commit f25507e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cpp/common/src/codingstandards/cpp/Scope.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ class Scope extends Element {
8080

8181
Scope getAnAncestor() { result = this.getStrictParent+() }
8282

83+
Scope getAChildScope() { result.getStrictParent() = this }
84+
8385
Scope getStrictParent() { result = Internal::getParentScope(this) }
8486

8587
Declaration getADeclaration() { Internal::getParentScope(result) = this }

0 commit comments

Comments
 (0)