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