mirror of
https://github.com/github/codeql.git
synced 2026-05-03 04:39:29 +02:00
Ruby: Remove CFG dependency from AST stage
Commit 028ef6f27f had the unintended side-effect
that the AST and CFG stages got merged, because the AST stage's `isCapturedAccess`
now depends on `getCfgScopeImpl`, which belongs to the CFG stage.
The fix is to remove `getCfgScopeImpl` from the CFG stage, and instead let it
be part of the AST stage.
This commit is contained in:
@@ -1041,6 +1041,9 @@ private Scope parent(Scope n) {
|
||||
not n instanceof CfgScope::Range_
|
||||
}
|
||||
|
||||
cached
|
||||
private CfgScope getCfgScopeImpl(AstNode n) { result = parent*(scopeOfInclSynth(n)) }
|
||||
|
||||
/** Gets the CFG scope of node `n`. */
|
||||
pragma[inline]
|
||||
CfgScope getCfgScope(AstNode n) {
|
||||
@@ -1052,13 +1055,6 @@ CfgScope getCfgScope(AstNode n) {
|
||||
|
||||
cached
|
||||
private module Cached {
|
||||
/** Gets the CFG scope of node `n`. */
|
||||
cached
|
||||
CfgScope getCfgScopeImpl(AstNode n) {
|
||||
forceCachingInSameStage() and
|
||||
result = parent*(scopeOfInclSynth(n))
|
||||
}
|
||||
|
||||
cached
|
||||
newtype TSuccessorType =
|
||||
TSuccessorSuccessor() or
|
||||
|
||||
Reference in New Issue
Block a user