Skip to content

Commit

Permalink
SE: Remove SymbolicValue.This (#6980)
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-strecker-sonarsource authored and pavel-mikula-sonarsource committed Apr 4, 2023
1 parent e970a31 commit 36de92a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace SonarAnalyzer.SymbolicExecution.Roslyn.OperationProcessors;
internal sealed class InstanceReference : ISimpleProcessor
{
public ProgramState Process(SymbolicContext context) =>
context.State.SetOperationValue(context.Operation, SymbolicValue.This); // Implicit and Explicit
context.State.SetOperationValue(context.Operation, SymbolicValue.NotNull); // Implicit and Explicit
}

internal sealed class LocalReference : SimpleProcessor<ILocalReferenceOperationWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public sealed record SymbolicValue

// Reuse instances to save memory. This "True" has the same semantic meaning and any other symbolic value with BoolConstraint.True constraint
public static readonly SymbolicValue Empty = new();
public static readonly SymbolicValue This = Empty.WithConstraint(ObjectConstraint.NotNull);
public static readonly SymbolicValue Null = Empty.WithConstraint(ObjectConstraint.Null);
public static readonly SymbolicValue NotNull = Empty.WithConstraint(ObjectConstraint.NotNull);
public static readonly SymbolicValue True = NotNull.WithConstraint(BoolConstraint.True);
Expand Down

0 comments on commit 36de92a

Please sign in to comment.