Skip to content

Commit

Permalink
apply renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
mary-georgiou-sonarsource committed Jul 18, 2024
1 parent 61d4eb8 commit 072a35e
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace SonarAnalyzer.CFG.LiveVariableAnalysis;

public sealed class RoslynLiveVariableAnalysis : LiveVariableAnalysisBase<ControlFlowGraph, BasicBlock>
{
private readonly Dictionary<CaptureId, List<ISymbol>> flowCaptureOperations = [];
private readonly Dictionary<CaptureId, List<ISymbol>> flowCaptures = [];
private readonly Dictionary<int, List<BasicBlock>> blockPredecessors = [];
private readonly Dictionary<int, List<BasicBlock>> blockSuccessors = [];

Expand Down Expand Up @@ -72,7 +72,7 @@ protected override IEnumerable<BasicBlock> Successors(BasicBlock block) =>
protected override State ProcessBlock(BasicBlock block)
{
var ret = new RoslynState(this);
ret.ProcessBlock(Cfg, block, flowCaptureOperations);
ret.ProcessBlock(Cfg, block, flowCaptures);
return ret;
}

Expand All @@ -86,7 +86,7 @@ private void ResolveCaptures()
.Select(x => x.Instance.ToFlowCapture()))
{
if (flowCapture.Value.AsFlowCaptureReference() is { } captureReference
&& flowCaptureOperations.TryGetValue(captureReference.Id, out var symbols))
&& flowCaptures.TryGetValue(captureReference.Id, out var symbols))
{
AppendFlowCaptureReference(flowCapture.Id, symbols.ToArray());
}
Expand All @@ -98,10 +98,10 @@ private void ResolveCaptures()

void AppendFlowCaptureReference(CaptureId id, params ISymbol[] symbols)
{
if (!flowCaptureOperations.TryGetValue(id, out var list))
if (!flowCaptures.TryGetValue(id, out var list))
{
list = [];
flowCaptureOperations.Add(id, list);
flowCaptures.Add(id, list);
}
list.AddRange(symbols);
}
Expand Down

0 comments on commit 072a35e

Please sign in to comment.