1 write to Type
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntity.cs (1)
60
Type
= type;
51 references to Type
Microsoft.CodeAnalysis.AnalyzerUtilities (51)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAbstractValue.cs (3)
25
Debug.Assert(kind != CopyAbstractValueKind.KnownReferenceCopy || analysisEntities.All(a => !a.
Type
.IsValueType));
29
!analysisEntities.First().
Type
.IsValueType)
46
kind: analysisEntity.
Type
.IsReferenceType ? CopyAbstractValueKind.KnownReferenceCopy : CopyAbstractValueKind.KnownValueCopy)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\CopyAnalysis\CopyAnalysis.CopyDataFlowOperationVisitor.cs (4)
203
newKind = analysisEntity.
Type
.IsValueType ?
210
!analysisEntity.
Type
.IsValueType &&
263
else if (assignedValue.AnalysisEntity == null || assignedValue.AnalysisEntity.
Type
.IsValueType)
491
if (entity.
Type
.HasValueCopySemantics())
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\DefaultPointsToValueGenerator.cs (1)
37
else if (analysisEntity.
Type
.IsNonNullableValueType())
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysis.cs (1)
102
if (!ShouldBeTracked(analysisEntity.
Type
, isDisposable) &&
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PointsToAnalysis\PointsToAnalysis.PointsToDataFlowOperationVisitor.cs (7)
94
return !PointsToAnalysis.ShouldBeTracked(analysisEntity.
Type
, IsDisposable) ?
296
var location = AbstractLocation.CreateAllocationLocation(operation, analysisEntity.
Type
, DataFlowAnalysisContext);
418
SetValueForNullCompareFromPredicate(analysisEntity, value, targetEntity.
Type
, equals, inferInTargetAnalysisData,
425
SetValueForNullCompareFromPredicate(targetEntity, value, targetEntity.
Type
, equals, inferInTargetAnalysisData,
517
if (!SymbolEqualityComparer.Default.Equals(targetType, analysisEntity.
Type
))
519
var conversion = compilation.ClassifyCommonConversion(targetType, analysisEntity.
Type
);
665
if (escapedEntity?.
Type
.HasValueCopySemantics() == true)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AbstractLocation.cs (1)
61
=> Create(creation: null, creationCallStack: null, analysisEntity: analysisEntity, symbol: null, captureId: null, locationType: analysisEntity.
Type
);
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AddressSharedEntitiesProvider.cs (1)
50
var isReferenceCopy = !addressSharedEntities.Any(a => a.
Type
.IsValueType);
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntity.cs (12)
28
/// 1. An associated non-null <see cref="
Type
"/> and
51
Debug.Assert(parent == null || parent.
Type
.HasValueCopySemantics() || !indices.IsEmpty);
132
return new AnalysisEntity(Symbol, Indices, InstanceReferenceOperationSyntax, CaptureId, mergedInstanceLocation,
Type
, Parent, EntityForInstanceLocation, IsThisOrMeInstance);
186
return Parent != null && Parent.
Type
.HasValueCopySemantics();
217
=> new(Symbol, indices, InstanceReferenceOperationSyntax, CaptureId, InstanceLocation,
Type
, Parent, EntityForInstanceLocation, IsThisOrMeInstance);
238
&&
Type
.GetHashCodeOrDefault() == other.
Type
.GetHashCodeOrDefault()
265
hashCode.Add(
Type
.GetHashCode());
295
=>
Type
.SpecialType == SpecialType.System_Boolean ||
296
Type
.IsNullableOfBoolean() ||
297
Type
.Language == LanguageNames.VisualBasic &&
Type
.SpecialType == SpecialType.System_Object;
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityDataFlowOperationVisitor.cs (12)
146
if (analysisEntity.
Type
.HasValueCopySemantics())
240
if (tupleElementEntity.
Type
.IsTupleType)
268
targetAnalysisEntity.
Type
.HasValueCopySemantics())
310
SetAbstractValue(analysisEntity, GetDefaultValueForParameterOnExit(analysisEntity.
Type
));
329
Debug.Assert(analysisEntity.
Type
.HasValueCopySemantics());
363
Debug.Assert(targetAnalysisEntity.
Type
.HasValueCopySemantics());
368
if (!valueAnalysisEntity.
Type
.HasValueCopySemantics())
401
if (!HasCompletePointsToAnalysisResult && analysisEntity.
Type
.IsReferenceType)
411
Debug.Assert(analysisEntity.
Type
.HasValueCopySemantics());
424
return (!ancestorEntity.
Type
.HasValueCopySemantics() || entity.HasAncestor(ancestorEntity)) &&
802
SymbolEqualityComparer.Default.Equals(tupleElementEntity.
Type
.OriginalDefinition, childEntity.
Type
.OriginalDefinition);
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\AnalysisEntityFactory.cs (5)
211
analysisEntity.
Type
.IsValueType == capturedEntity.
Type
.IsValueType)
224
var kind = capturedEntity.
Type
.IsValueType ? CopyAbstractValueKind.KnownValueCopy : CopyAbstractValueKind.KnownReferenceCopy;
462
instanceEntityOpt.
Type
.IsValueType)
577
return Create(analysisEntity.Symbol, analysisEntity.Indices, analysisEntity.
Type
, newRootInstance.InstanceLocation, parentOpt, newRootInstance.EntityForInstanceLocation);
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (4)
1727
!analysisEntity.
Type
.HasValueCopySemantics() &&
1728
(analysisEntity.
Type
as INamedTypeSymbol)?.OverridesEquals() == false);
2031
if (analysisEntity.
Type
.HasValueCopySemantics())
3655
if (AnalysisEntityFactory.ThisOrMeInstance.
Type
.HasValueCopySemantics())