// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// Note that this is an X-macro header.
//
// It does not use `#include` guards, and instead is designed to be `#include`ed
// after some set of x-macros are defined in order for its inclusion to expand
// to the desired output.
//
// The viable X-macros to define prior to including the header are:
//
// - `CARBON_DIAGNOSTIC_KIND`

#ifndef CARBON_DIAGNOSTIC_KIND
#error "Must define the x-macro to use this file."
#endif

// ============================================================================
// Lexer diagnostics
// ============================================================================

CARBON_DIAGNOSTIC_KIND(BinaryRealLiteral)
CARBON_DIAGNOSTIC_KIND(ContentBeforeStringTerminator)
CARBON_DIAGNOSTIC_KIND(DecimalEscapeSequence)
CARBON_DIAGNOSTIC_KIND(EmptyDigitSequence)
CARBON_DIAGNOSTIC_KIND(HexadecimalEscapeMissingDigits)
CARBON_DIAGNOSTIC_KIND(InvalidDigit)
CARBON_DIAGNOSTIC_KIND(InvalidDigitSeparator)
CARBON_DIAGNOSTIC_KIND(InvalidHorizontalWhitespaceInString)
CARBON_DIAGNOSTIC_KIND(IrregularDigitSeparators)
CARBON_DIAGNOSTIC_KIND(MismatchedClosing)
CARBON_DIAGNOSTIC_KIND(MismatchedIndentInString)
CARBON_DIAGNOSTIC_KIND(MultiLineStringWithDoubleQuotes)
CARBON_DIAGNOSTIC_KIND(NoWhitespaceAfterCommentIntroducer)
CARBON_DIAGNOSTIC_KIND(TooManyDigits)
CARBON_DIAGNOSTIC_KIND(TrailingComment)
CARBON_DIAGNOSTIC_KIND(UnicodeEscapeMissingBracedDigits)
CARBON_DIAGNOSTIC_KIND(UnicodeEscapeSurrogate)
CARBON_DIAGNOSTIC_KIND(UnicodeEscapeTooLarge)
CARBON_DIAGNOSTIC_KIND(UnknownBaseSpecifier)
CARBON_DIAGNOSTIC_KIND(UnknownEscapeSequence)
CARBON_DIAGNOSTIC_KIND(UnmatchedClosing)
CARBON_DIAGNOSTIC_KIND(UnrecognizedCharacters)
CARBON_DIAGNOSTIC_KIND(UnterminatedString)
CARBON_DIAGNOSTIC_KIND(WrongRealLiteralExponent)

// ============================================================================
// Parser diagnostics
// ============================================================================

CARBON_DIAGNOSTIC_KIND(BinaryOperatorRequiresWhitespace)
CARBON_DIAGNOSTIC_KIND(ExpectedArraySemi)
CARBON_DIAGNOSTIC_KIND(ExpectedCloseSymbol)
CARBON_DIAGNOSTIC_KIND(ExpectedCodeBlock)
CARBON_DIAGNOSTIC_KIND(ExpectedExpression)
CARBON_DIAGNOSTIC_KIND(ExpectedIdentifierAfterDotOrArrow)
CARBON_DIAGNOSTIC_KIND(ExpectedParameterName)
CARBON_DIAGNOSTIC_KIND(ExpectedParenAfter)
CARBON_DIAGNOSTIC_KIND(ExpectedExpressionSemi)
CARBON_DIAGNOSTIC_KIND(ExpectedStatementSemi)
CARBON_DIAGNOSTIC_KIND(ExpectedStructLiteralField)
CARBON_DIAGNOSTIC_KIND(ExpectedVariableDeclaration)
CARBON_DIAGNOSTIC_KIND(ExpectedVariableName)
CARBON_DIAGNOSTIC_KIND(OperatorRequiresParentheses)
CARBON_DIAGNOSTIC_KIND(StatementOperatorAsSubexpression)
CARBON_DIAGNOSTIC_KIND(UnaryOperatorRequiresParentheses)
CARBON_DIAGNOSTIC_KIND(UnaryOperatorHasWhitespace)
CARBON_DIAGNOSTIC_KIND(UnaryOperatorRequiresWhitespace)
CARBON_DIAGNOSTIC_KIND(UnexpectedTokenAfterListElement)
CARBON_DIAGNOSTIC_KIND(UnrecognizedDeclaration)

// Package-related diagnostics.
CARBON_DIAGNOSTIC_KIND(ExpectedIdentifierAfterPackage)
CARBON_DIAGNOSTIC_KIND(ExpectedLibraryName)
CARBON_DIAGNOSTIC_KIND(MissingLibraryKeyword)
CARBON_DIAGNOSTIC_KIND(ExpectedApiOrImpl)

// For-specific diagnostics.
CARBON_DIAGNOSTIC_KIND(ExpectedIn)
CARBON_DIAGNOSTIC_KIND(ExpectedInNotColon)

// If-specific diagnostics.
CARBON_DIAGNOSTIC_KIND(ExpectedThenAfterIf)
CARBON_DIAGNOSTIC_KIND(ExpectedElseAfterIf)

// Declaration diagnostics.
CARBON_DIAGNOSTIC_KIND(ExpectedDeclarationName)
CARBON_DIAGNOSTIC_KIND(ExpectedDeclarationSemi)
CARBON_DIAGNOSTIC_KIND(ExpectedDeclarationSemiOrDefinition)
CARBON_DIAGNOSTIC_KIND(MethodImplNotAllowed)
CARBON_DIAGNOSTIC_KIND(ParametersRequiredByIntroducer)
CARBON_DIAGNOSTIC_KIND(ParametersRequiredByDeduced)

// ============================================================================
// Semantics diagnostics
// ============================================================================

CARBON_DIAGNOSTIC_KIND(SemanticsTodo)

CARBON_DIAGNOSTIC_KIND(AddressOfEphemeralReference)
CARBON_DIAGNOSTIC_KIND(AddressOfNonReference)
CARBON_DIAGNOSTIC_KIND(AssignmentToNonAssignable)
CARBON_DIAGNOSTIC_KIND(DereferenceOfNonPointer)
CARBON_DIAGNOSTIC_KIND(DereferenceOfType)
CARBON_DIAGNOSTIC_KIND(NameNotFound)
CARBON_DIAGNOSTIC_KIND(NameDeclarationDuplicate)
CARBON_DIAGNOSTIC_KIND(NameDeclarationPrevious)
CARBON_DIAGNOSTIC_KIND(NoMatchingCall)
CARBON_DIAGNOSTIC_KIND(CallArgCountMismatch)
CARBON_DIAGNOSTIC_KIND(CallArgTypeMismatch)
CARBON_DIAGNOSTIC_KIND(MissingReturnStatement)
CARBON_DIAGNOSTIC_KIND(RepeatedConst)
CARBON_DIAGNOSTIC_KIND(InvalidArrayExpression)
CARBON_DIAGNOSTIC_KIND(TypeNotIndexable)
CARBON_DIAGNOSTIC_KIND(IndexOutOfBounds)
CARBON_DIAGNOSTIC_KIND(TupleIndexIntegerLiteral)
CARBON_DIAGNOSTIC_KIND(ReturnStatementDisallowExpression)
CARBON_DIAGNOSTIC_KIND(ReturnStatementImplicitNote)
CARBON_DIAGNOSTIC_KIND(ReturnStatementMissingExpression)
CARBON_DIAGNOSTIC_KIND(ImplicitAsConversionFailure)
CARBON_DIAGNOSTIC_KIND(QualifiedDeclarationInNonScope)
CARBON_DIAGNOSTIC_KIND(QualifiedDeclarationNonScopeEntity)
CARBON_DIAGNOSTIC_KIND(QualifiedExpressionUnsupported)
CARBON_DIAGNOSTIC_KIND(QualifiedExpressionNameNotFound)

// ============================================================================
// Other diagnostics
// ============================================================================

// TestDiagnostic is only for unit tests.
CARBON_DIAGNOSTIC_KIND(TestDiagnostic)
CARBON_DIAGNOSTIC_KIND(TestDiagnosticNote)

#undef CARBON_DIAGNOSTIC_KIND
