Clean up SimpleDiagnostic inheritance (#1004)

This commit is contained in:
Jon Meow
2022-01-07 11:01:01 -08:00
committed by GitHub
parent b7df523dc8
commit cab5bb0158
6 changed files with 77 additions and 59 deletions
+5 -5
View File
@@ -25,32 +25,32 @@
namespace Carbon {
struct TrailingComment : SimpleDiagnostic<TrailingComment> {
struct TrailingComment : DiagnosticBase<TrailingComment> {
static constexpr llvm::StringLiteral ShortName = "syntax-comments";
static constexpr llvm::StringLiteral Message =
"Trailing comments are not permitted.";
};
struct NoWhitespaceAfterCommentIntroducer
: SimpleDiagnostic<NoWhitespaceAfterCommentIntroducer> {
: DiagnosticBase<NoWhitespaceAfterCommentIntroducer> {
static constexpr llvm::StringLiteral ShortName = "syntax-comments";
static constexpr llvm::StringLiteral Message =
"Whitespace is required after '//'.";
};
struct UnmatchedClosing : SimpleDiagnostic<UnmatchedClosing> {
struct UnmatchedClosing : DiagnosticBase<UnmatchedClosing> {
static constexpr llvm::StringLiteral ShortName = "syntax-balanced-delimiters";
static constexpr llvm::StringLiteral Message =
"Closing symbol without a corresponding opening symbol.";
};
struct MismatchedClosing : SimpleDiagnostic<MismatchedClosing> {
struct MismatchedClosing : DiagnosticBase<MismatchedClosing> {
static constexpr llvm::StringLiteral ShortName = "syntax-balanced-delimiters";
static constexpr llvm::StringLiteral Message =
"Closing symbol does not match most recent opening symbol.";
};
struct UnrecognizedCharacters : SimpleDiagnostic<UnrecognizedCharacters> {
struct UnrecognizedCharacters : DiagnosticBase<UnrecognizedCharacters> {
static constexpr llvm::StringLiteral ShortName =
"syntax-unrecognized-characters";
static constexpr llvm::StringLiteral Message =