1 write to Diagnostics
Microsoft.CodeAnalysis.CSharp (1)
FlowAnalysis\AbstractFlowPass.cs (1)
212
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)
135
this.
Diagnostics
.Clear(); // clear reported diagnostics
143
Diagnostics
.Add(ErrorCode.WRN_UnreferencedLabel, label.GetFirstLocation());
197
diagnostics.AddRange(this.
Diagnostics
);
220
Diagnostics
.Add(ErrorCode.ERR_LabelNotFound, loc, ((BoundGotoStatement)pending.Branch).Label.Name);
228
Diagnostics
.Add(ErrorCode.ERR_BadDelegateLeave, loc);
269
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 (21)
331
this.
Diagnostics
.Clear();
435
Diagnostics
.Add(ErrorCode.WRN_AsyncLacksAwaits, diagnosticLocation);
482
if (
Diagnostics
!= null && this.State.Reachable)
512
Diagnostics
.Add(
519
Diagnostics
.Add(
537
Diagnostics
.Add(ErrorCode.ERR_ParamUnassigned, location, parameter.Name);
556
Diagnostics
.Add(ErrorCode.ERR_ParamUnassigned, location, parameter.Name);
712
diagnostics.AddRange(this.
Diagnostics
);
1257
Diagnostics
.Add(ErrorCode.ERR_UseDefViolationOut, node.Location, symbolName);
1262
Diagnostics
.Add(ErrorCode.ERR_UseDefViolation, node.Location, symbolName);
1310
Diagnostics
.Add(ErrorCode.WRN_UseDefViolationThisSupportedVersion, node.Location);
1314
Diagnostics
.Add(
1328
Diagnostics
.Add(hasAssociatedProperty ? ErrorCode.ERR_UseDefViolationProperty : ErrorCode.ERR_UseDefViolationField, node.Location, symbolName);
1338
Diagnostics
.Add(hasAssociatedProperty ? ErrorCode.ERR_UseDefViolationProperty : ErrorCode.ERR_UseDefViolationField, node.Location, symbolName);
1354
Diagnostics
.Add(
1362
Diagnostics
.Add(
1369
Diagnostics
.Add(
1977
Diagnostics
.Add((primaryCtor.ContainingType is { IsRecord: true } or { IsRecordStruct: true }) ?
2354
Diagnostics
.Add(assigned && _writtenVariables.Contains(symbol) ? ErrorCode.WRN_UnreferencedVarAssg : ErrorCode.WRN_UnreferencedVar, symbol.GetFirstLocationOrNone(), symbol.Name);
2373
Diagnostics
.Add(ErrorCode.WRN_UnreferencedLocalFunction, symbol.GetFirstLocationOrNone(), symbol.Name);
2402
Diagnostics
.Add(ErrorCode.ERR_FixedLocalInLambda, new SourceLocation(node.Syntax), localSymbol);
FlowAnalysis\NullableWalker.cs (15)
593
this.
Diagnostics
.Clear();
800
Diagnostics
.Add(info, exitLocation ?? symbol.GetFirstLocationOrNone());
1064
Diagnostics
.Add(ErrorCode.WRN_MemberNotNull, syntax.GetLocation(), member.Name);
1133
Diagnostics
.Add(ErrorCode.WRN_MemberNotNullWhen, syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation(), member.Name, sense ? "true" : "false");
1294
Diagnostics
.Add(ErrorCode.WRN_ParameterDisallowsNull, location, parameter.Name);
1321
Diagnostics
.Add(ErrorCode.WRN_ParameterConditionallyDisallowsNull, syntax.Location, parameter.Name, sense ? "true" : "false");
1380
Diagnostics
.Add(ErrorCode.WRN_ParameterNotNullIfNotNull, location, outputParam.Name, inputParam.Name);
1385
Diagnostics
.Add(ErrorCode.WRN_ReturnNotNullIfNotNull, location, inputParam.Name);
1872
diagnostics?.AddRange(walker.
Diagnostics
);
2665
Diagnostics
.Add(errorCode, location, arguments);
8184
Diagnostics
.Add(pair.UseSiteInfo.DiagnosticInfo, syntax.Location);
8609
Diagnostics
.AddRange(diagnostics.DiagnosticBag);
8811
Diagnostics
.AddRange(diagnostics.DiagnosticBag);
8867
Diagnostics
.AddRange(diagnostics.DiagnosticBag);
8882
Diagnostics
.AddRange(diagnostics.DiagnosticBag);