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