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)
445
this.
Diagnostics
.Clear();
455
this.
Diagnostics
.Free();
897
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));
310
Diagnostics
.Add(ErrorCode.ERR_BadFinallyLeave, location);
350
Diagnostics
.Add(ErrorCode.ERR_GoToForwardJumpOverUsingVar, sourceLocation);
362
Diagnostics
.Add(ErrorCode.ERR_GoToBackwardJumpOverUsingVar, sourceLocation);
379
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
);
1194
Diagnostics
.Add(ErrorCode.ERR_UseDefViolationOut, node.Location, symbolName);
1199
Diagnostics
.Add(ErrorCode.ERR_UseDefViolation, node.Location, symbolName);
1247
Diagnostics
.Add(ErrorCode.WRN_UseDefViolationThisSupportedVersion, node.Location);
1251
Diagnostics
.Add(
1265
Diagnostics
.Add(hasAssociatedProperty ? ErrorCode.ERR_UseDefViolationProperty : ErrorCode.ERR_UseDefViolationField, node.Location, symbolName);
1275
Diagnostics
.Add(hasAssociatedProperty ? ErrorCode.ERR_UseDefViolationProperty : ErrorCode.ERR_UseDefViolationField, node.Location, symbolName);
1291
Diagnostics
.Add(
1299
Diagnostics
.Add(
1306
Diagnostics
.Add(
1914
Diagnostics
.Add((primaryCtor.ContainingType is { IsRecord: true } or { IsRecordStruct: true }) ?
2283
Diagnostics
.Add(assigned && _writtenVariables.Contains(symbol) ? ErrorCode.WRN_UnreferencedVarAssg : ErrorCode.WRN_UnreferencedVar, symbol.GetFirstLocationOrNone(), symbol.Name);
2302
Diagnostics
.Add(ErrorCode.WRN_UnreferencedLocalFunction, symbol.GetFirstLocationOrNone(), symbol.Name);
2331
Diagnostics
.Add(ErrorCode.ERR_FixedLocalInLambda, new SourceLocation(node.Syntax), localSymbol);
FlowAnalysis\NullableWalker.cs (16)
618
this.
Diagnostics
.Clear();
827
Diagnostics
.Add(info, exitLocation ?? symbol.GetFirstLocationOrNone());
1091
Diagnostics
.Add(ErrorCode.WRN_MemberNotNull, syntax.GetLocation(), member.Name);
1160
Diagnostics
.Add(ErrorCode.WRN_MemberNotNullWhen, syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation(), member.Name, sense ? "true" : "false");
1332
Diagnostics
.Add(ErrorCode.WRN_ParameterDisallowsNull, location, parameter.Name);
1359
Diagnostics
.Add(ErrorCode.WRN_ParameterConditionallyDisallowsNull, syntax.Location, parameter.Name, sense ? "true" : "false");
1418
Diagnostics
.Add(ErrorCode.WRN_ParameterNotNullIfNotNull, location, outputParam.Name, inputParam.Name);
1423
Diagnostics
.Add(ErrorCode.WRN_ReturnNotNullIfNotNull, location, inputParam.Name);
1911
diagnostics?.AddRange(walker.
Diagnostics
);
2704
Diagnostics
.Add(errorCode, location, arguments);
8628
Diagnostics
.Add(pair.UseSiteInfo.DiagnosticInfo, syntax.Location);
8658
Diagnostics
.Add(pair.UseSiteInfo.DiagnosticInfo, syntax.Location);
9084
Diagnostics
.AddRange(diagnostics.DiagnosticBag);
9286
Diagnostics
.AddRange(diagnostics.DiagnosticBag);
9342
Diagnostics
.AddRange(diagnostics.DiagnosticBag);
9357
Diagnostics
.AddRange(diagnostics.DiagnosticBag);