1 write to compilation
Microsoft.CodeAnalysis.CSharp (1)
FlowAnalysis\AbstractFlowPass.cs (1)
213
this.
compilation
= compilation;
64 references to compilation
Microsoft.CodeAnalysis.CSharp (64)
FlowAnalysis\AbstractFlowPass_Switch.cs (1)
96
if (
compilation
.LanguageVersion >= MessageID.IDS_FeatureRecursivePatterns.RequiredVersion())
FlowAnalysis\DefiniteAssignment.cs (4)
486
if (
compilation
.IsFeatureEnabled(MessageID.IDS_FeatureAutoDefaultStructs))
1243
if (
compilation
.IsFeatureEnabled(MessageID.IDS_FeatureAutoDefaultStructs))
1284
if (
compilation
.IsFeatureEnabled(MessageID.IDS_FeatureAutoDefaultStructs))
2472
if (!type.IsFromCompilation(this.
compilation
))
FlowAnalysis\NullableWalker.cs (56)
275
SetResult(expression, resultType: type, lvalueType: type.ToTypeWithAnnotations(
compilation
), updateAnalyzedNullability: updateAnalyzedNullability);
280
SetAnalyzedNullability(expression, resultType: type, lvalueType: type.ToTypeWithAnnotations(
compilation
));
288
SetResult(expression, ResultType, ResultType.ToTypeWithAnnotations(
compilation
), isLvalue: false);
309
private void SetInvalidResult() => SetResult(expression: null, _invalidType, _invalidType.ToTypeWithAnnotations(
compilation
), updateAnalyzedNullability: false);
468
compilation
.TestOnlyCompilationData is NullableAnalysisData { MaxRecursionDepth: var depth } &&
964
||
compilation
.IsFeatureEnabled(MessageID.IDS_FeatureAutoDefaultStructs)))
1758
if (
compilation
.TestOnlyCompilationData is NullableAnalysisData { Data: { } state })
1959
var conversionsWithoutNullability = this.
compilation
.Conversions;
2274
if (isMaybeDefaultValue(valueType) && !allowUnconstrainedTypeParameterAnnotations(
compilation
))
2845
_returnTypesOpt.Add((node, result.ToTypeWithAnnotations(
compilation
)));
2923
if (method.IsAsyncEffectivelyReturningGenericTask(
compilation
))
3192
var resultType = ResultType.ToTypeWithAnnotations(
compilation
);
3314
type = valueType.ToAnnotatedTypeWithAnnotations(
compilation
);
4087
arg.ToTypeWithAnnotations(
compilation
));
4201
placeholderBuilder.Add(CreatePlaceholderIfNecessary(expressionNoConversion, expressionType.ToTypeWithAnnotations(
compilation
)));
4231
inferredType = TypeWithState.Create(inferredType.Type, elementState).ToTypeWithAnnotations(
compilation
);
4395
TypeSymbol.Equals(node.Indices[0].Type,
compilation
.GetWellKnownType(WellKnownType.System_Range), TypeCompareKind.ConsiderEverything2))
4739
SetResult(binary, inferredResult, inferredResult.ToTypeWithAnnotations(
compilation
));
5480
BoundExpression consequencePlaceholder = CreatePlaceholderIfNecessary(consequence, consequenceRValue.ToTypeWithAnnotations(
compilation
));
5481
BoundExpression alternativePlaceholder = CreatePlaceholderIfNecessary(alternative, alternativeRValue.ToTypeWithAnnotations(
compilation
));
5732
var isStaticEqualsMethod = method.Equals(
compilation
.GetSpecialTypeMember(SpecialMember.System_Object__EqualsObjectObject))
5733
|| method.Equals(
compilation
.GetSpecialTypeMember(SpecialMember.System_Object__ReferenceEquals));
5735
isWellKnownEqualityMethodOrImplementation(
compilation
, method, receiverType.Type, WellKnownMember.System_Collections_Generic_IEqualityComparer_T__Equals))
5743
.Equals(
compilation
.GetSpecialTypeMember(SpecialMember.System_Object__Equals));
5746
isWellKnownEqualityMethodOrImplementation(
compilation
, method, receiverType.Type, WellKnownMember.System_IEquatable_T__Equals)))
5887
return method.Equals(
compilation
.GetWellKnownTypeMember(WellKnownMember.System_Threading_Interlocked__CompareExchange), SymbolEqualityComparer.ConsiderEverything.CompareKind)
5888
|| method.OriginalDefinition.Equals(
compilation
.GetWellKnownTypeMember(WellKnownMember.System_Threading_Interlocked__CompareExchange_T), SymbolEqualityComparer.ConsiderEverything.CompareKind);
5974
else if (method.OriginalDefinition ==
compilation
.GetSpecialTypeMember(SpecialMember.System_Nullable_T_get_Value))
6750
var varType = worstCaseParameterWithState.ToAnnotatedTypeWithAnnotations(
compilation
);
6756
SetAnalyzedNullability(discard, new VisitResult(parameterWithState, parameterWithState.ToTypeWithAnnotations(
compilation
)), isLvalue: true);
7138
var argumentResult = visitArgumentResult.RValueType.ToTypeWithAnnotations(
compilation
);
7183
new ConstraintsHelper.CheckConstraintsArgs(
compilation
, _conversions, includeNullability: true, NoLocation.Singleton, diagnostics: null, template: CompoundUseSiteInfo<AssemblySymbol>.Discarded),
7573
ImmutableArray<TypeWithAnnotations> elementTypesWithAnnotations = elementTypes.SelectAsArray(a => a.ToTypeWithAnnotations(
compilation
));
7592
tupleOpt.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(
compilation
, _conversions, includeNullability: true, node.Syntax.Location, diagnostics: null),
7782
compilation
,
7833
compilation
,
7846
compilation
,
8599
var visitResult = new VisitResult(resultType, resultType.ToTypeWithAnnotations(
compilation
));
8647
return
compilation
.GetSpecialType(SpecialType.System_Nullable_T).Construct(ImmutableArray.Create(underlying));
8923
arguments.Add(CreatePlaceholderIfNecessary(receiverOpt, receiverType.ToTypeWithAnnotations(
compilation
)));
9090
var lvalueType = rightState.ToTypeWithAnnotations(
compilation
);
9297
placeholderArgs.Add(CreatePlaceholderIfNecessary(right, rightResult.ToTypeWithAnnotations(
compilation
)));
9391
_variables.SetType(local.LocalSymbol, operandType.ToAnnotatedTypeWithAnnotations(
compilation
));
9513
expr = CreatePlaceholderIfNecessary(expr, rightResult.ToTypeWithAnnotations(
compilation
));
9596
var operandTypeWithAnnotations = operandType.ToTypeWithAnnotations(
compilation
);
9929
if (getMethod ==
compilation
.GetSpecialTypeMember(SpecialMember.System_Nullable_T_get_Value))
9933
if (getMethod ==
compilation
.GetSpecialTypeMember(SpecialMember.System_Nullable_T_get_HasValue))
9947
var getValue = (MethodSymbol)
compilation
.GetSpecialTypeMember(SpecialMember.System_Nullable_T_get_Value);
10022
targetTypeWithAnnotations = resultTypeWithState.ToTypeWithAnnotations(
compilation
);
10032
else if (ForEachLoopBinder.IsIEnumerableT(node.Expression.Type.OriginalDefinition, isAsync,
compilation
))
10037
targetTypeWithAnnotations = TypeWithAnnotations.Create(ForEachLoopBinder.GetIEnumerableOfT(resultType, isAsync,
compilation
, ref discardedUseSiteInfo, out bool foundMultiple));
10069
SetAnalyzedNullability(node.Expression, new VisitResult(convertedResult, convertedResult.ToTypeWithAnnotations(
compilation
)));
10152
TypeWithAnnotations sourceType = sourceState.ToTypeWithAnnotations(
compilation
);
10196
destinationType = sourceState.ToAnnotatedTypeWithAnnotations(
compilation
);
10928
new VisitArgumentResult(new VisitResult(result, result.ToTypeWithAnnotations(
compilation
)), stateForLambda: default),
11079
TypeWithAnnotations elementType = InMethodBinder.GetIteratorElementTypeFromReturnType(
compilation
, RefKind.None,
FlowAnalysis\NullableWalker_Patterns.cs (3)
349
var expressionTypeWithAnnotations = expressionTypeWithState.ToTypeWithAnnotations(
compilation
);
644
var inferredType = value.ToTypeWithAnnotations(
compilation
, asAnnotatedType: boundLocal.DeclarationKind == BoundLocalDeclarationKind.WithInferredType);
900
placeholderBuilder.Add(CreatePlaceholderIfNecessary(expression, armType.ToTypeWithAnnotations(
compilation
)));