Skip to content

Commit cbc9012

Browse files
committed
Rename method
1 parent ea225bf commit cbc9012

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Utilities/Compiler/Extensions/ITypeSymbolExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ public static bool HasValueCopySemantics(this ITypeSymbol typeSymbol)
295295
=> typeSymbol.IsValueType || typeSymbol.SpecialType == SpecialType.System_String;
296296

297297
#if !MICROSOFT_CODEANALYSIS_PUBLIC_API_ANALYZERS
298-
public static bool HasReferenceTypeSemantics([NotNullWhen(returnValue: true)] this ITypeSymbol? typeSymbol)
298+
public static bool CanHoldNullValue([NotNullWhen(returnValue: true)] this ITypeSymbol? typeSymbol)
299299
=> typeSymbol.IsReferenceTypeOrNullableValueType() ||
300300
typeSymbol?.IsRefLikeType == true ||
301301
typeSymbol is ITypeParameterSymbol typeParameter && !typeParameter.IsValueType;

src/Utilities/FlowAnalysis/FlowAnalysis/Analysis/PointsToAnalysis/PointsToAnalysis.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ private PointsToAnalysis(PointsToAnalysisDomain analysisDomain, PointsToDataFlow
9090
}
9191

9292
internal static bool ShouldBeTracked([NotNullWhen(returnValue: true)] ITypeSymbol? typeSymbol, Func<ITypeSymbol?, bool> isDisposable)
93-
=> typeSymbol.HasReferenceTypeSemantics() ||
93+
=> typeSymbol.CanHoldNullValue() ||
9494
isDisposable(typeSymbol);
9595

9696
internal static bool ShouldBeTracked(AnalysisEntity analysisEntity, PointsToAnalysisKind pointsToAnalysisKind, Func<ITypeSymbol?, bool> isDisposable)

src/Utilities/FlowAnalysis/FlowAnalysis/Analysis/ValueContentAnalysis/ValueContentAnalysis.ValueContentDataFlowOperationVisitor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected override ValueContentAbstractValue GetAbstractValue(AnalysisEntity ana
6363
=> CurrentAnalysisData.TryGetValue(analysisEntity, out var value) ? value : ValueDomain.UnknownOrMayBeValue;
6464

6565
protected override ValueContentAbstractValue GetAbstractDefaultValue(ITypeSymbol? type)
66-
=> type != null && !type.HasReferenceTypeSemantics() ?
66+
=> type != null && !type.CanHoldNullValue() ?
6767
ValueContentAbstractValue.DoesNotContainLiteralOrNonLiteralState :
6868
ValueContentAbstractValue.ContainsNullLiteralState;
6969

0 commit comments

Comments
 (0)