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