1 write to Diagnostics
Microsoft.CodeAnalysis.CSharp (1)
FlowAnalysis\AbstractFlowPass.cs (1)
211this.Diagnostics = DiagnosticBag.GetInstance();
50 references to Diagnostics
Microsoft.CodeAnalysis.CSharp (50)
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 (21)
332this.Diagnostics.Clear(); 421Diagnostics.Add(ErrorCode.WRN_AsyncLacksAwaits, diagnosticLocation); 468if (Diagnostics != null && this.State.Reachable) 498Diagnostics.Add( 505Diagnostics.Add( 523Diagnostics.Add(ErrorCode.ERR_ParamUnassigned, location, parameter.Name); 542Diagnostics.Add(ErrorCode.ERR_ParamUnassigned, location, parameter.Name); 698diagnostics.AddRange(this.Diagnostics); 1243Diagnostics.Add(ErrorCode.ERR_UseDefViolationOut, node.Location, symbolName); 1248Diagnostics.Add(ErrorCode.ERR_UseDefViolation, node.Location, symbolName); 1296Diagnostics.Add(ErrorCode.WRN_UseDefViolationThisSupportedVersion, node.Location); 1300Diagnostics.Add( 1314Diagnostics.Add(hasAssociatedProperty ? ErrorCode.ERR_UseDefViolationProperty : ErrorCode.ERR_UseDefViolationField, node.Location, symbolName); 1324Diagnostics.Add(hasAssociatedProperty ? ErrorCode.ERR_UseDefViolationProperty : ErrorCode.ERR_UseDefViolationField, node.Location, symbolName); 1340Diagnostics.Add( 1348Diagnostics.Add( 1355Diagnostics.Add( 1963Diagnostics.Add((primaryCtor.ContainingType is { IsRecord: true } or { IsRecordStruct: true }) ? 2340Diagnostics.Add(assigned && _writtenVariables.Contains(symbol) ? ErrorCode.WRN_UnreferencedVarAssg : ErrorCode.WRN_UnreferencedVar, symbol.GetFirstLocationOrNone(), symbol.Name); 2359Diagnostics.Add(ErrorCode.WRN_UnreferencedLocalFunction, symbol.GetFirstLocationOrNone(), symbol.Name); 2388Diagnostics.Add(ErrorCode.ERR_FixedLocalInLambda, new SourceLocation(node.Syntax), localSymbol);
FlowAnalysis\NullableWalker.cs (16)
599this.Diagnostics.Clear(); 810Diagnostics.Add(info, exitLocation ?? symbol.GetFirstLocationOrNone()); 1074Diagnostics.Add(ErrorCode.WRN_MemberNotNull, syntax.GetLocation(), member.Name); 1143Diagnostics.Add(ErrorCode.WRN_MemberNotNullWhen, syntaxOpt?.GetLocation() ?? methodMainNode.Syntax.GetLastToken().GetLocation(), member.Name, sense ? "true" : "false"); 1315Diagnostics.Add(ErrorCode.WRN_ParameterDisallowsNull, location, parameter.Name); 1342Diagnostics.Add(ErrorCode.WRN_ParameterConditionallyDisallowsNull, syntax.Location, parameter.Name, sense ? "true" : "false"); 1401Diagnostics.Add(ErrorCode.WRN_ParameterNotNullIfNotNull, location, outputParam.Name, inputParam.Name); 1406Diagnostics.Add(ErrorCode.WRN_ReturnNotNullIfNotNull, location, inputParam.Name); 1893diagnostics?.AddRange(walker.Diagnostics); 2686Diagnostics.Add(errorCode, location, arguments); 8488Diagnostics.Add(pair.UseSiteInfo.DiagnosticInfo, syntax.Location); 8518Diagnostics.Add(pair.UseSiteInfo.DiagnosticInfo, syntax.Location); 8944Diagnostics.AddRange(diagnostics.DiagnosticBag); 9146Diagnostics.AddRange(diagnostics.DiagnosticBag); 9202Diagnostics.AddRange(diagnostics.DiagnosticBag); 9217Diagnostics.AddRange(diagnostics.DiagnosticBag);