1 write to _diagnostics
Microsoft.CodeAnalysis.CSharp (1)
Lowering\LocalRewriter\LocalRewriter.cs (1)
77
_diagnostics
= diagnostics;
72 references to _diagnostics
Microsoft.CodeAnalysis.CSharp (72)
Lowering\LocalRewriter\LocalRewriter.cs (6)
252
this.
_diagnostics
.Add(ErrorCode.ERR_InterceptorCannotInterceptNameof, nameofIdentiferSyntax.Location);
346
_factory.ModuleBuilderOpt.EnsureParamCollectionAttributeExists(
_diagnostics
, location);
600
symbol = (TSymbol?)Binder.GetWellKnownTypeMember(_compilation, member,
_diagnostics
, syntax: syntax, isOptional: isOptional, location: location);
611
return UnsafeGetSpecialTypeMethod(syntax, specialMember, _compilation,
_diagnostics
);
638
return TryGetSpecialTypeMethod(syntax, specialMember, _compilation,
_diagnostics
, out method, isOptional);
1136
return new CompoundUseSiteInfo<AssemblySymbol>(
_diagnostics
, _compilation.Assembly);
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (1)
923
var privateImplClass = module.GetPrivateImplClass(syntaxNode, _localRewriter.
_diagnostics
.DiagnosticBag);
Lowering\LocalRewriter\LocalRewriter.PatternLocalRewriter.cs (2)
214
_localRewriter.
_diagnostics
.Add(t.Syntax, useSiteInfo);
493
_localRewriter.
_diagnostics
.Add(test.Syntax, useSiteInfo);
Lowering\LocalRewriter\LocalRewriter_BinaryOperator.cs (2)
739
_diagnostics
.Add(loweredLeft.Syntax, useSiteInfo);
1896
return UnsafeGetNullableMethod(syntax, nullableType, member, _compilation,
_diagnostics
);
Lowering\LocalRewriter\LocalRewriter_Call.cs (16)
110
module.EmbeddedTypesManagerOpt.EmbedMethodIfNeedTo(m.OriginalDefinition.GetCciAdapter(), syntaxNode,
_diagnostics
.DiagnosticBag);
129
module.EmbeddedTypesManagerOpt.EmbedPropertyIfNeedTo(p.OriginalDefinition.GetCciAdapter(), syntaxNode,
_diagnostics
.DiagnosticBag);
163
this.
_diagnostics
.Add(ErrorCode.ERR_InterceptorCannotBeGeneric, attributeLocation, interceptor, method);
169
this.
_diagnostics
.Add(ErrorCode.ERR_InterceptorArityNotCompatible, attributeLocation, interceptor, netArity, method);
175
if (!interceptor.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(this._compilation, this._compilation.Conversions, includeNullability: true, attributeLocation, this.
_diagnostics
)))
183
this.
_diagnostics
.Add(ErrorCode.ERR_InterceptableMethodMustBeOrdinary, attributeLocation, nameSyntax.Identifier.ValueText);
192
this.
_diagnostics
.Add(attributeLocation, useSiteInfo);
195
this.
_diagnostics
.Add(ErrorCode.ERR_InterceptorNotAccessible, attributeLocation, interceptor, containingMethod);
207
this.
_diagnostics
.Add(ErrorCode.ERR_InterceptorSignatureMismatch, attributeLocation, method, interceptor);
215
_diagnostics
,
228
this.
_diagnostics
.Add(ErrorCode.WRN_InterceptorSignatureMismatch, attributeLocation, method, interceptor);
239
this.
_diagnostics
.Add(ErrorCode.ERR_InterceptorMustHaveMatchingThisParameter, attributeLocation, methodThisParameter, method);
242
this.
_diagnostics
.Add(ErrorCode.ERR_InterceptorMustNotHaveThisParameter, attributeLocation, method);
251
this.
_diagnostics
.Add(ErrorCode.ERR_InterceptorMustHaveMatchingThisParameter, attributeLocation, method.Parameters[0], method);
258
this.
_diagnostics
,
1432
_diagnostics
.ReportUseSite(arrayEmpty, syntax);
Lowering\LocalRewriter\LocalRewriter_CollectionExpression.cs (7)
398
Debug.Assert(
_diagnostics
.DiagnosticBag is { });
431
var synthesizedType = _factory.ModuleBuilderOpt.EnsureReadOnlyListTypeExists(syntax, kind: kind,
_diagnostics
.DiagnosticBag).Construct(typeArgs);
549
Debug.Assert(
_diagnostics
.DiagnosticBag is { });
571
var inlineArrayType = _factory.ModuleBuilderOpt.EnsureInlineArrayTypeExists(syntax, _factory, arrayLength,
_diagnostics
.DiagnosticBag).Construct(ImmutableArray.Create(elementType));
575
MethodSymbol elementRef = _factory.ModuleBuilderOpt.EnsureInlineArrayElementRefExists(syntax, intType,
_diagnostics
.DiagnosticBag).
603
_factory.ModuleBuilderOpt.EnsureInlineArrayAsReadOnlySpanExists(syntax, _factory.WellKnownType(WellKnownType.System_ReadOnlySpan_T), intType,
_diagnostics
.DiagnosticBag) :
604
_factory.ModuleBuilderOpt.EnsureInlineArrayAsSpanExists(syntax, _factory.WellKnownType(WellKnownType.System_Span_T), intType,
_diagnostics
.DiagnosticBag);
Lowering\LocalRewriter\LocalRewriter_Conversion.cs (7)
133
_diagnostics
.Add(
310
Debug.Assert(
_diagnostics
.DiagnosticBag is { });
603
createSpan = _factory.ModuleBuilderOpt.EnsureInlineArrayAsReadOnlySpanExists(syntax, spanType.OriginalDefinition, _factory.SpecialType(SpecialType.System_Int32),
_diagnostics
.DiagnosticBag);
608
createSpan = _factory.ModuleBuilderOpt.EnsureInlineArrayAsSpanExists(syntax, spanType.OriginalDefinition, _factory.SpecialType(SpecialType.System_Int32),
_diagnostics
.DiagnosticBag);
748
_factory.ModuleBuilderOpt.EnsureParamCollectionAttributeExists(
_diagnostics
, node.Location);
789
Conversion conversion = MakeConversion(rewrittenOperand, rewrittenType, @checked: @checked, _compilation,
_diagnostics
, acceptFailingConversion);
1857
_diagnostics
.Add(syntax, useSiteInfo);
Lowering\LocalRewriter\LocalRewriter_DeconstructionAssignmentOperator.cs (1)
266
compilation: _compilation, shouldCheckConstraints: false, includeNullability: false, errorPositions: default, syntax: (CSharpSyntaxNode)right.Syntax, diagnostics:
_diagnostics
);
Lowering\LocalRewriter\LocalRewriter_Event.cs (3)
37
_diagnostics
.Add(errorInfo, node.Syntax.Location);
278
_diagnostics
.Add(new CSDiagnosticInfo(ErrorCode.ERR_MissingPredefinedMember, invocationListProperty.ContainingType, accessorName), syntax.Location);
325
module.EmbeddedTypesManagerOpt.EmbedEventIfNeedTo(node.Event.GetCciAdapter(), node.Syntax,
_diagnostics
.DiagnosticBag, isUsedForComAwareEventBinding: true);
Lowering\LocalRewriter\LocalRewriter_Field.cs (2)
75
var tupleRestField = (FieldSymbol?)NamedTypeSymbol.GetWellKnownMemberInType(currentLinkType.OriginalDefinition, wellKnownTupleRest,
_diagnostics
, syntax);
110
_diagnostics
.Add(useSiteInfo, syntax);
Lowering\LocalRewriter\LocalRewriter_ForEachStatement.cs (7)
294
disposeMethod = (MethodSymbol)Binder.GetWellKnownTypeMember(_compilation, WellKnownMember.System_IAsyncDisposable__DisposeAsync,
_diagnostics
, syntax: forEachSyntax);
298
return Binder.TryGetSpecialTypeMember(_compilation, SpecialMember.System_IDisposable__Dispose, forEachSyntax,
_diagnostics
, out disposeMethod);
342
_diagnostics
.Add(forEachSyntax, useSiteInfo);
345
Binder.ReportDiagnosticsIfObsolete(
_diagnostics
, disposeMethod, forEachSyntax,
771
Debug.Assert(rewriter.
_diagnostics
.DiagnosticBag is { });
776
elementRef = rewriter._factory.ModuleBuilderOpt.EnsureInlineArrayElementRefExists(syntax, intType, rewriter.
_diagnostics
.DiagnosticBag);
781
elementRef = rewriter._factory.ModuleBuilderOpt.EnsureInlineArrayElementRefReadOnlyExists(syntax, intType, rewriter.
_diagnostics
.DiagnosticBag);
Lowering\LocalRewriter\LocalRewriter_FunctionPointerInvocation.cs (1)
40
this.
_diagnostics
.Add(ErrorCode.ERR_InterceptableMethodMustBeOrdinary, attributeLocation, nameSyntax.Identifier.ValueText);
Lowering\LocalRewriter\LocalRewriter_IndexerAccess.cs (7)
202
Debug.Assert(
_diagnostics
.DiagnosticBag is { });
328
createSpan = _factory.ModuleBuilderOpt.EnsureInlineArrayAsReadOnlySpanExists(node.Syntax, spanType, intType,
_diagnostics
.DiagnosticBag);
332
createSpan = _factory.ModuleBuilderOpt.EnsureInlineArrayAsSpanExists(node.Syntax, spanType, intType,
_diagnostics
.DiagnosticBag);
354
elementRef = _factory.ModuleBuilderOpt.EnsureInlineArrayFirstElementRefExists(node.Syntax,
_diagnostics
.DiagnosticBag);
359
elementRef = _factory.ModuleBuilderOpt.EnsureInlineArrayFirstElementRefReadOnlyExists(node.Syntax,
_diagnostics
.DiagnosticBag);
373
elementRef = _factory.ModuleBuilderOpt.EnsureInlineArrayElementRefExists(node.Syntax, intType,
_diagnostics
.DiagnosticBag);
378
elementRef = _factory.ModuleBuilderOpt.EnsureInlineArrayElementRefReadOnlyExists(node.Syntax, intType,
_diagnostics
.DiagnosticBag);
Lowering\LocalRewriter\LocalRewriter_LockStatement.cs (1)
45
if (LockBinder.TryFindLockTypeInfo(argumentType,
_diagnostics
, rewrittenArgument.Syntax) is not { } lockTypeInfo)
Lowering\LocalRewriter\LocalRewriter_ObjectCreationExpression.cs (1)
343
method.CheckConstraints(new ConstraintsHelper.CheckConstraintsArgs(_compilation, _compilation.Conversions, syntax.GetLocation(),
_diagnostics
));
Lowering\LocalRewriter\LocalRewriter_StringInterpolation.cs (1)
225
var toStringAndClear = (MethodSymbol)Binder.GetWellKnownTypeMember(_compilation, WellKnownMember.System_Runtime_CompilerServices_DefaultInterpolatedStringHandler__ToStringAndClear,
_diagnostics
, syntax: syntax);
Lowering\LocalRewriter\LocalRewriter_TupleCreationExpression.cs (4)
59
_diagnostics
,
69
Binder.CheckRequiredMembersInObjectInitializer(smallestConstructor, initializers: ImmutableArray<BoundExpression>.Empty, syntax,
_diagnostics
);
76
_diagnostics
,
83
Binder.CheckRequiredMembersInObjectInitializer(tuple8Ctor, initializers: ImmutableArray<BoundExpression>.Empty, syntax,
_diagnostics
);
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (3)
166
_diagnostics
.ReportUseSite(iDisposableType, usingSyntax);
242
_diagnostics
.ReportUseSite(iDisposableType, usingSyntax);
451
Binder.TryGetSpecialTypeMember(_compilation, SpecialMember.System_IDisposable__Dispose, resourceTypeSyntax,
_diagnostics
, out disposeMethod);