1 write to Diagnostics
Microsoft.CodeAnalysis.CSharp (1)
FlowAnalysis\AbstractFlowPass.cs (1)
212
this.
Diagnostics
= DiagnosticBag.GetInstance();
46 references to Diagnostics
Microsoft.CodeAnalysis.CSharp (46)
FlowAnalysis\AbstractFlowPass.cs (3)
447
this.
Diagnostics
.Clear();
457
this.
Diagnostics
.Free();
891
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.Locations[0]);
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);
364
Diagnostics
.Add(ErrorCode.ERR_GoToBackwardJumpOverUsingVar, sourceLocation);
381
Diagnostics
.Add(isLastSection ? ErrorCode.ERR_SwitchFallOut : ErrorCode.ERR_SwitchFallThrough,
FlowAnalysis\DefiniteAssignment.cs (19)
332
this.
Diagnostics
.Clear();
413
Diagnostics
.Add(ErrorCode.WRN_AsyncLacksAwaits, diagnosticLocation);
460
if (
Diagnostics
!= null && this.State.Reachable)
488
Diagnostics
.Add(
495
Diagnostics
.Add(
512
Diagnostics
.Add(ErrorCode.ERR_ParamUnassigned, location, parameter.Name);
676
diagnostics.AddRange(this.
Diagnostics
);
1198
Diagnostics
.Add(ErrorCode.ERR_UseDefViolationOut, node.Location, symbolName);
1203
Diagnostics
.Add(ErrorCode.ERR_UseDefViolation, node.Location, symbolName);
1245
Diagnostics
.Add(ErrorCode.WRN_UseDefViolationThisSupportedVersion, node.Location);
1249
Diagnostics
.Add(
1263
Diagnostics
.Add(hasAssociatedProperty ? ErrorCode.ERR_UseDefViolationProperty : ErrorCode.ERR_UseDefViolationField, node.Location, symbolName);
1273
Diagnostics
.Add(hasAssociatedProperty ? ErrorCode.ERR_UseDefViolationProperty : ErrorCode.ERR_UseDefViolationField, node.Location, symbolName);
1286
Diagnostics
.Add(
1293
Diagnostics
.Add(
1824
Diagnostics
.Add((primaryCtor.ContainingType is { IsRecord: true } or { IsRecordStruct: true }) ?
2163
Diagnostics
.Add(assigned && _writtenVariables.Contains(symbol) ? ErrorCode.WRN_UnreferencedVarAssg : ErrorCode.WRN_UnreferencedVar, symbol.Locations.FirstOrNone(), symbol.Name);
2182
Diagnostics
.Add(ErrorCode.WRN_UnreferencedLocalFunction, symbol.Locations.FirstOrNone(), symbol.Name);
2211
Diagnostics
.Add(ErrorCode.ERR_FixedLocalInLambda, new SourceLocation(node.Syntax), localSymbol);
FlowAnalysis\NullableWalker.cs (14)
551
this.
Diagnostics
.Clear();
754
Diagnostics
.Add(info, exitLocation ?? symbol.Locations.FirstOrNone());
765
Diagnostics
.Add(ErrorCode.WRN_MemberNotNull, syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation(), member.Name);
836
Diagnostics
.Add(ErrorCode.WRN_MemberNotNullWhen, syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation(), member.Name, sense ? "true" : "false");
1174
Diagnostics
.Add(ErrorCode.WRN_ParameterDisallowsNull, location, parameter.Name);
1201
Diagnostics
.Add(ErrorCode.WRN_ParameterConditionallyDisallowsNull, syntax.Location, parameter.Name, sense ? "true" : "false");
1260
Diagnostics
.Add(ErrorCode.WRN_ParameterNotNullIfNotNull, location, outputParam.Name, inputParam.Name);
1265
Diagnostics
.Add(ErrorCode.WRN_ReturnNotNullIfNotNull, location, inputParam.Name);
1741
diagnostics?.AddRange(walker.
Diagnostics
);
2515
Diagnostics
.Add(errorCode, location, arguments);
7191
Diagnostics
.Add(pair.UseSiteInfo.DiagnosticInfo, syntax.Location);
7593
typeSyntax: node.Syntax, locations, nullabilityDiagnosticsOpt: new BindingDiagnosticBag(
Diagnostics
));
7785
new BindingDiagnosticBag(
Diagnostics
),
7831
var diagnostics = new BindingDiagnosticBag(
Diagnostics
);