Open dotpaul opened 5 years ago
Potentially can be moved to https://github.com/dotnet/roslyn-analyzers/issues/1547, which tracks bunch of other enhancements for string content analysis. I thought we already handle string.Empty though: https://github.com/dotnet/roslyn-analyzers/blob/features/dataflow/src/Utilities/FlowAnalysis/Analysis/ValueContentAnalysis/ValueContentAnalysis.ValueContentDataFlowOperationVisitor.cs#L216 and unit test here
Ah this is about PointsToAnalysis, not value content. Just need to add a similar special handling to its operation visitor. Makes sense to track it with this issue as the this is about PointsTo analysis and #1547 is about value content.
I don't have any scenario at the moment yet, just noticed it while testing.
Expected: PointsToAnalysis treats String.Empty as NullAbstractValue.NotNull, with a singleton location.
Actual: PointsToAnalysis treats String.Empty as NullAbstractValue.MaybeNull.