1 write to Diagnostics
Microsoft.CodeAnalysis.CSharp (1)
FlowAnalysis\AbstractFlowPass.cs (1)
211
this.
Diagnostics
= DiagnosticBag.GetInstance();
49 references to Diagnostics
Microsoft.CodeAnalysis.CSharp (49)
FlowAnalysis\AbstractFlowPass.cs (3)
446
this.
Diagnostics
.Clear();
456
this.
Diagnostics
.Free();
898
Diagnostics
.Add(ErrorCode.ERR_InternalError, node.Syntax.Location);
FlowAnalysis\ControlFlowPass.cs (10)
134
this.
Diagnostics
.Clear(); // clear reported diagnostics
142
Diagnostics
.Add(ErrorCode.WRN_UnreferencedLabel, label.GetFirstLocation());
196
diagnostics.AddRange(this.
Diagnostics
);
219
Diagnostics
.Add(ErrorCode.ERR_LabelNotFound, loc, ((BoundGotoStatement)pending.Branch).Label.Name);
227
Diagnostics
.Add(ErrorCode.ERR_BadDelegateLeave, loc);
268
Diagnostics
.Add(ErrorCode.WRN_UnreachableCode, new SourceLocation(firstToken));
311
Diagnostics
.Add(ErrorCode.ERR_BadFinallyLeave, location);
351
Diagnostics
.Add(ErrorCode.ERR_GoToForwardJumpOverUsingVar, sourceLocation);
363
Diagnostics
.Add(ErrorCode.ERR_GoToBackwardJumpOverUsingVar, sourceLocation);
380
Diagnostics
.Add(isLastSection ? ErrorCode.ERR_SwitchFallOut : ErrorCode.ERR_SwitchFallThrough,
FlowAnalysis\DefiniteAssignment.cs (20)
332
this.
Diagnostics
.Clear();
419
if (
Diagnostics
!= null && this.State.Reachable)
449
Diagnostics
.Add(
456
Diagnostics
.Add(
474
Diagnostics
.Add(ErrorCode.ERR_ParamUnassigned, location, parameter.Name);
493
Diagnostics
.Add(ErrorCode.ERR_ParamUnassigned, location, parameter.Name);
649
diagnostics.AddRange(this.
Diagnostics
);
1195
Diagnostics
.Add(ErrorCode.ERR_UseDefViolationOut, node.Location, symbolName);
1200
Diagnostics
.Add(ErrorCode.ERR_UseDefViolation, node.Location, symbolName);
1248
Diagnostics
.Add(ErrorCode.WRN_UseDefViolationThisSupportedVersion, node.Location);
1252
Diagnostics
.Add(
1266
Diagnostics
.Add(hasAssociatedProperty ? ErrorCode.ERR_UseDefViolationProperty : ErrorCode.ERR_UseDefViolationField, node.Location, symbolName);
1276
Diagnostics
.Add(hasAssociatedProperty ? ErrorCode.ERR_UseDefViolationProperty : ErrorCode.ERR_UseDefViolationField, node.Location, symbolName);
1292
Diagnostics
.Add(
1300
Diagnostics
.Add(
1307
Diagnostics
.Add(
1915
Diagnostics
.Add((primaryCtor.ContainingType is { IsRecord: true } or { IsRecordStruct: true }) ?
2284
Diagnostics
.Add(assigned && _writtenVariables.Contains(symbol) ? ErrorCode.WRN_UnreferencedVarAssg : ErrorCode.WRN_UnreferencedVar, symbol.GetFirstLocationOrNone(), symbol.Name);
2303
Diagnostics
.Add(ErrorCode.WRN_UnreferencedLocalFunction, symbol.GetFirstLocationOrNone(), symbol.Name);
2332
Diagnostics
.Add(ErrorCode.ERR_FixedLocalInLambda, new SourceLocation(node.Syntax), localSymbol);
FlowAnalysis\NullableWalker.cs (16)
619
this.
Diagnostics
.Clear();
829
Diagnostics
.Add(info, exitLocation ?? symbol.GetFirstLocationOrNone());
1093
Diagnostics
.Add(ErrorCode.WRN_MemberNotNull, syntax.GetLocation(), member.Name);
1162
Diagnostics
.Add(ErrorCode.WRN_MemberNotNullWhen, syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation(), member.Name, sense ? "true" : "false");
1334
Diagnostics
.Add(ErrorCode.WRN_ParameterDisallowsNull, location, parameter.Name);
1361
Diagnostics
.Add(ErrorCode.WRN_ParameterConditionallyDisallowsNull, syntax.Location, parameter.Name, sense ? "true" : "false");
1420
Diagnostics
.Add(ErrorCode.WRN_ParameterNotNullIfNotNull, location, outputParam.Name, inputParam.Name);
1425
Diagnostics
.Add(ErrorCode.WRN_ReturnNotNullIfNotNull, location, inputParam.Name);
1913
diagnostics?.AddRange(walker.
Diagnostics
);
2705
Diagnostics
.Add(errorCode, location, arguments);
8919
Diagnostics
.Add(pair.UseSiteInfo.DiagnosticInfo, syntax.Location);
8949
Diagnostics
.Add(pair.UseSiteInfo.DiagnosticInfo, syntax.Location);
9375
Diagnostics
.AddRange(diagnostics.DiagnosticBag);
9636
Diagnostics
.AddRange(diagnostics.DiagnosticBag);
9692
Diagnostics
.AddRange(diagnostics.DiagnosticBag);
9707
Diagnostics
.AddRange(diagnostics.DiagnosticBag);