File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
csharp/ql/lib/semmle/code/csharp Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -129,13 +129,6 @@ private module Cached {
129129 result = parent .getAChildStmt ( )
130130 }
131131
132- pragma [ inline]
133- private ControlFlowElement enclosingStart ( ControlFlowElement cfe ) {
134- result = cfe
135- or
136- getAChild ( result ) .( AnonymousFunctionExpr ) = cfe
137- }
138-
139132 private predicate parent ( ControlFlowElement child , ExprOrStmtParent parent ) {
140133 child = getAChild ( parent ) and
141134 not child = getBody ( _)
@@ -145,15 +138,15 @@ private module Cached {
145138 cached
146139 predicate enclosingBody ( ControlFlowElement cfe , ControlFlowElement body ) {
147140 body = getBody ( _) and
148- parent * ( enclosingStart ( cfe ) , body )
141+ parent * ( cfe , body )
149142 }
150143
151144 /** Holds if the enclosing callable of `cfe` is `c`. */
152145 cached
153146 predicate enclosingCallable ( ControlFlowElement cfe , Callable c ) {
154147 enclosingBody ( cfe , getBody ( c ) )
155148 or
156- parent * ( enclosingStart ( cfe ) , c .( Constructor ) .getInitializer ( ) )
149+ parent * ( cfe , c .( Constructor ) .getInitializer ( ) )
157150 or
158151 parent * ( cfe , c .( Constructor ) .getObjectInitializerCall ( ) )
159152 or
You can’t perform that action at this time.
0 commit comments