@@ -129,7 +129,7 @@ class Element extends ElementBase {
129
129
* or certain kinds of `Statement`.
130
130
*/
131
131
Element getParentScope ( ) {
132
- // result instanceof class
132
+ // result instanceof Class
133
133
exists ( Declaration m |
134
134
m = this and
135
135
result = m .getDeclaringType ( ) and
@@ -138,31 +138,40 @@ class Element extends ElementBase {
138
138
or
139
139
exists ( TemplateClass tc | this = tc .getATemplateArgument ( ) and result = tc )
140
140
or
141
- // result instanceof namespace
141
+ // result instanceof Namespace
142
142
exists ( Namespace n | result = n and n .getADeclaration ( ) = this )
143
143
or
144
144
exists ( FriendDecl d , Namespace n | this = d and n .getADeclaration ( ) = d and result = n )
145
145
or
146
146
exists ( Namespace n | this = n and result = n .getParentNamespace ( ) )
147
147
or
148
- // result instanceof stmt
148
+ // result instanceof Stmt
149
149
exists ( LocalVariable v |
150
150
this = v and
151
151
exists ( DeclStmt ds | ds .getADeclaration ( ) = v and result = ds .getParent ( ) )
152
152
)
153
153
or
154
- exists ( Parameter p | this = p and result = p .getFunction ( ) )
154
+ exists ( Parameter p |
155
+ this = p and
156
+ (
157
+ result = p .getFunction ( ) or
158
+ result = p .getCatchBlock ( ) .getParent ( ) .( Handler ) .getParent ( ) .( TryStmt ) .getParent ( ) or
159
+ result = p .getRequiresExpr ( ) .getEnclosingStmt ( ) .getParent ( )
160
+ )
161
+ )
155
162
or
156
163
exists ( GlobalVariable g , Namespace n | this = g and n .getADeclaration ( ) = g and result = n )
157
164
or
165
+ exists ( TemplateVariable tv | this = tv .getATemplateArgument ( ) and result = tv )
166
+ or
158
167
exists ( EnumConstant e | this = e and result = e .getDeclaringEnum ( ) )
159
168
or
160
- // result instanceof block|function
169
+ // result instanceof Block|Function
161
170
exists ( BlockStmt b | this = b and blockscope ( unresolveElement ( b ) , unresolveElement ( result ) ) )
162
171
or
163
172
exists ( TemplateFunction tf | this = tf .getATemplateArgument ( ) and result = tf )
164
173
or
165
- // result instanceof stmt
174
+ // result instanceof Stmt
166
175
exists ( ControlStructure s | this = s and result = s .getParent ( ) )
167
176
or
168
177
using_container ( unresolveElement ( result ) , underlyingElement ( this ) )
0 commit comments