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