1 write to Diagnostics
Microsoft.CodeAnalysis.CSharp (1)
FlowAnalysis\AbstractFlowPass.cs (1)
211
this.
Diagnostics
= DiagnosticBag.GetInstance();
50 references to Diagnostics
Microsoft.CodeAnalysis.CSharp (50)
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);
232
Diagnostics
.Add(ErrorCode.ERR_BadDelegateLeave, loc);
273
Diagnostics
.Add(ErrorCode.WRN_UnreachableCode, new SourceLocation(firstToken));
316
Diagnostics
.Add(ErrorCode.ERR_BadFinallyLeave, location);
356
Diagnostics
.Add(ErrorCode.ERR_GoToForwardJumpOverUsingVar, sourceLocation);
368
Diagnostics
.Add(ErrorCode.ERR_GoToBackwardJumpOverUsingVar, sourceLocation);
399
Diagnostics
.Add(isLastSection ? ErrorCode.ERR_SwitchFallOut : ErrorCode.ERR_SwitchFallThrough,
FlowAnalysis\DefiniteAssignment.cs (21)
337
this.
Diagnostics
.Clear();
425
if (
Diagnostics
!= null && this.State.Reachable)
455
Diagnostics
.Add(
462
Diagnostics
.Add(
480
Diagnostics
.Add(ErrorCode.ERR_ParamUnassigned, location, parameter.Name);
499
Diagnostics
.Add(ErrorCode.ERR_ParamUnassigned, location, parameter.Name);
658
diagnostics.AddRange(this.
Diagnostics
);
1204
Diagnostics
.Add(ErrorCode.ERR_UseDefViolationOut, node.Location, symbolName);
1209
Diagnostics
.Add(ErrorCode.ERR_UseDefViolation, node.Location, symbolName);
1257
Diagnostics
.Add(ErrorCode.WRN_UseDefViolationThisSupportedVersion, node.Location);
1261
Diagnostics
.Add(
1275
Diagnostics
.Add(hasAssociatedProperty ? ErrorCode.ERR_UseDefViolationProperty : ErrorCode.ERR_UseDefViolationField, node.Location, symbolName);
1285
Diagnostics
.Add(hasAssociatedProperty ? ErrorCode.ERR_UseDefViolationProperty : ErrorCode.ERR_UseDefViolationField, node.Location, symbolName);
1301
Diagnostics
.Add(
1309
Diagnostics
.Add(
1316
Diagnostics
.Add(
1924
Diagnostics
.Add((primaryCtor.ContainingType is { IsRecord: true } or { IsRecordStruct: true }) ?
2293
Diagnostics
.Add(assigned && _writtenVariables.Contains(symbol) ? ErrorCode.WRN_UnreferencedVarAssg : ErrorCode.WRN_UnreferencedVar, symbol.GetFirstLocationOrNone(), symbol.Name);
2312
Diagnostics
.Add(ErrorCode.WRN_UnreferencedLocalFunction, symbol.GetFirstLocationOrNone(), symbol.Name);
2341
Diagnostics
.Add(ErrorCode.ERR_FixedLocalInLambda, new SourceLocation(node.Syntax), localSymbol);
2585
Diagnostics
.Add(ErrorCode.ERR_UnsafeUnassignedAddressOf, addressOfOpt.Syntax.Location);
FlowAnalysis\NullableWalker.cs (16)
638
this.
Diagnostics
.Clear();
852
Diagnostics
.Add(info, exitLocation ?? symbol.GetFirstLocationOrNone());
1147
Diagnostics
.Add(ErrorCode.WRN_MemberNotNull, syntax.GetLocation(), member.Name);
1216
Diagnostics
.Add(ErrorCode.WRN_MemberNotNullWhen, syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation(), member.Name, sense ? "true" : "false");
1388
Diagnostics
.Add(ErrorCode.WRN_ParameterDisallowsNull, location, parameter.Name);
1415
Diagnostics
.Add(ErrorCode.WRN_ParameterConditionallyDisallowsNull, syntax.Location, parameter.Name, sense ? "true" : "false");
1474
Diagnostics
.Add(ErrorCode.WRN_ParameterNotNullIfNotNull, location, outputParam.Name, inputParam.Name);
1479
Diagnostics
.Add(ErrorCode.WRN_ReturnNotNullIfNotNull, location, inputParam.Name);
1967
diagnostics?.AddRange(walker.
Diagnostics
);
2778
Diagnostics
.Add(errorCode, location, arguments);
9058
Diagnostics
.Add(pair.UseSiteInfo.DiagnosticInfo, syntax.Location);
9088
Diagnostics
.Add(pair.UseSiteInfo.DiagnosticInfo, syntax.Location);
9514
Diagnostics
.AddRange(diagnostics.DiagnosticBag);
9774
Diagnostics
.AddRange(diagnostics.DiagnosticBag);
9830
Diagnostics
.AddRange(diagnostics.DiagnosticBag);
9845
Diagnostics
.AddRange(diagnostics.DiagnosticBag);