23 references to DiagnosticSeverity
ilasm (1)
Program.cs (1)
258hasErrors |= diagnostic.Severity == DiagnosticSeverity.Error;
Microsoft.DotNet.ILAssembler (22)
Actions\GrammarActions.BuildImage.cs (1)
74var structuralErrors = _diagnostics.Where(d => d.Severity == DiagnosticSeverity.Error && !IsRecoverableError(d.Id));
Actions\GrammarActions.Conversions.cs (6)
86private void ReportDiagnostic(DiagnosticSeverity severity, string id, string message, Antlr4.Runtime.ParserRuleContext context) 93=> ReportDiagnostic(DiagnosticSeverity.Error, id, message, context); 134DiagnosticSeverity.Error, 140=> _diagnostics.Add(new Diagnostic(id, DiagnosticSeverity.Error, message, location)); 143=> ReportDiagnostic(DiagnosticSeverity.Warning, id, message, context); 149DiagnosticSeverity.Warning,
Actions\GrammarActions.Literals.cs (2)
192DiagnosticSeverity.Error, 231DiagnosticSeverity.Error,
Actions\GrammarActions.Manifest.Assembly.cs (1)
193DiagnosticSeverity.Error,
Actions\GrammarActions.Types.Headers.cs (1)
195DiagnosticSeverity.Error,
Diagnostic.cs (1)
14public record Diagnostic(string Id, DiagnosticSeverity Severity, string Message, Location Location);
DocumentCompiler.cs (6)
44diagnostics.Add(new Diagnostic("Preprocessor", DiagnosticSeverity.Error, msg, new Location(new(start, length), sourceText))); 48diagnostics.Add(new Diagnostic("Preprocessor", DiagnosticSeverity.Error, msg, new Location(new(start, length), new SourceText("", source)))); 79bool anyErrors = diagnostics.Any(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error); 80anyErrors |= image.Diagnostics.Any(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error); 116_diagnostics.Add(new Diagnostic(DiagnosticIds.Parser, DiagnosticSeverity.Error, $"line {line}:{charPositionInLine} {msg}", new Location(span, sourceText))); 120_diagnostics.Add(new Diagnostic(DiagnosticIds.Parser, DiagnosticSeverity.Error, $"line {line}:{charPositionInLine} {msg}", new Location(span, new SourceText("", sourceName))));
MethodBodyWriter.cs (3)
211_diagnostics.Add(new Diagnostic(DiagnosticIds.BranchOffsetOutOfRange, DiagnosticSeverity.Error, 245_diagnostics.Add(new Diagnostic(DiagnosticIds.InvalidExceptionRegion, DiagnosticSeverity.Error, 252_diagnostics.Add(new Diagnostic(DiagnosticIds.InvalidExceptionRegion, DiagnosticSeverity.Error,
PseudoCustomAttributes.cs (1)
91diagnostics.Add(new Diagnostic(id, DiagnosticSeverity.Error, message, Attribute.Location ?? s_unknownLocation));