// 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

// ============================================================================
// Driver and subcommand diagnostics
// ============================================================================

CARBON_DIAGNOSTIC_KIND(DriverInstallInvalid)
CARBON_DIAGNOSTIC_KIND(DriverCommandLineParseFailed)
CARBON_DIAGNOSTIC_KIND(ClangFuzzingDisallowed)
CARBON_DIAGNOSTIC_KIND(CompilePhaseFlagConflict)
CARBON_DIAGNOSTIC_KIND(CompilePreludeManifestError)
CARBON_DIAGNOSTIC_KIND(CompileInputNotRegularFile)
CARBON_DIAGNOSTIC_KIND(CompileOutputFileOpenError)
CARBON_DIAGNOSTIC_KIND(FormatMultipleFilesToOneOutput)
CARBON_DIAGNOSTIC_KIND(LanguageServerMissingInputStream)
CARBON_DIAGNOSTIC_KIND(LanguageServerTransportError)

// ============================================================================
// SourceBuffer diagnostics
// ============================================================================

CARBON_DIAGNOSTIC_KIND(ErrorOpeningFile)
CARBON_DIAGNOSTIC_KIND(ErrorStattingFile)
CARBON_DIAGNOSTIC_KIND(FileTooLarge)
CARBON_DIAGNOSTIC_KIND(ErrorReadingFile)

// ============================================================================
// 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(MismatchedIndentInString)
CARBON_DIAGNOSTIC_KIND(MultiLineStringWithDoubleQuotes)
CARBON_DIAGNOSTIC_KIND(NoWhitespaceAfterCommentIntroducer)
CARBON_DIAGNOSTIC_KIND(TooManyDigits)
CARBON_DIAGNOSTIC_KIND(TooManyTokens)
CARBON_DIAGNOSTIC_KIND(TooManyTypeBitWidthDigits)
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(UnsupportedCRLineEnding)
CARBON_DIAGNOSTIC_KIND(UnsupportedLFCRLineEnding)
CARBON_DIAGNOSTIC_KIND(UnmatchedOpening)
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(ExpectedExpr)
CARBON_DIAGNOSTIC_KIND(ExpectedIdentifierAfterPeriodOrArrow)
CARBON_DIAGNOSTIC_KIND(ExpectedIdentifierOrSelfAfterPeriod)
CARBON_DIAGNOSTIC_KIND(ExpectedBindingPattern)
CARBON_DIAGNOSTIC_KIND(ExpectedParenAfter)
CARBON_DIAGNOSTIC_KIND(ExpectedExprSemi)
CARBON_DIAGNOSTIC_KIND(ExpectedStatementSemi)
CARBON_DIAGNOSTIC_KIND(ExpectedStructLiteralField)
CARBON_DIAGNOSTIC_KIND(ExpectedVarAfterReturned)
CARBON_DIAGNOSTIC_KIND(ExpectedVariableDecl)
CARBON_DIAGNOSTIC_KIND(ExpectedChoiceDefinition)
CARBON_DIAGNOSTIC_KIND(ExpectedChoiceAlternativeName)
CARBON_DIAGNOSTIC_KIND(UnreachableMatchCase)
CARBON_DIAGNOSTIC_KIND(OperatorRequiresParentheses)
CARBON_DIAGNOSTIC_KIND(StatementOperatorAsSubExpr)
CARBON_DIAGNOSTIC_KIND(UnaryOperatorRequiresParentheses)
CARBON_DIAGNOSTIC_KIND(UnaryOperatorHasWhitespace)
CARBON_DIAGNOSTIC_KIND(UnaryOperatorRequiresWhitespace)
CARBON_DIAGNOSTIC_KIND(UnexpectedTokenAfterListElement)
CARBON_DIAGNOSTIC_KIND(UnrecognizedDecl)
CARBON_DIAGNOSTIC_KIND(UnexpectedTokenInCompoundMemberAccess)

// Match diagnostics.
CARBON_DIAGNOSTIC_KIND(UnexpectedTokenInMatchCasesBlock)
CARBON_DIAGNOSTIC_KIND(ExpectedMatchCases)
CARBON_DIAGNOSTIC_KIND(ExpectedMatchCasesBlock)
CARBON_DIAGNOSTIC_KIND(ExpectedMatchCaseArrow)
CARBON_DIAGNOSTIC_KIND(ExpectedMatchCaseBlock)
CARBON_DIAGNOSTIC_KIND(MatchParseTODO)

// Package-related diagnostics.
CARBON_DIAGNOSTIC_KIND(FirstDecl)
CARBON_DIAGNOSTIC_KIND(FirstNonCommentLine)
CARBON_DIAGNOSTIC_KIND(PackageTooLate)
CARBON_DIAGNOSTIC_KIND(ImportTooLate)
CARBON_DIAGNOSTIC_KIND(ExpectedIdentifierAfterPackage)
CARBON_DIAGNOSTIC_KIND(ExpectedIdentifierAfterImport)
CARBON_DIAGNOSTIC_KIND(ExpectedLibraryName)
CARBON_DIAGNOSTIC_KIND(ExpectedLibraryNameOrDefault)
CARBON_DIAGNOSTIC_KIND(MissingLibraryKeyword)
CARBON_DIAGNOSTIC_KIND(ExportImportPackage)
CARBON_DIAGNOSTIC_KIND(ExpectedPeriodAfterPackage)

// 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(ExpectedDeclName)
CARBON_DIAGNOSTIC_KIND(ExpectedDeclNameAfterPeriod)
CARBON_DIAGNOSTIC_KIND(ExpectedDeclSemi)
CARBON_DIAGNOSTIC_KIND(ExpectedDeclSemiOrDefinition)
CARBON_DIAGNOSTIC_KIND(ParamsRequiredAfterImplicit)
CARBON_DIAGNOSTIC_KIND(ExpectedAfterBase)
CARBON_DIAGNOSTIC_KIND(ExpectedBuiltinName)
CARBON_DIAGNOSTIC_KIND(ImplExpectedAfterForall)
CARBON_DIAGNOSTIC_KIND(ImplExpectedAs)

// Alias diagnostics.
CARBON_DIAGNOSTIC_KIND(ExpectedAliasInitializer)

// Where requirement diagnostics.
CARBON_DIAGNOSTIC_KIND(ExpectedRequirementOperator)
CARBON_DIAGNOSTIC_KIND(RequirementEqualAfterNonDesignator)

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

CARBON_DIAGNOSTIC_KIND(SemanticsTodo)

// Location context.
CARBON_DIAGNOSTIC_KIND(InImport)
CARBON_DIAGNOSTIC_KIND(ResolvingSpecificHere)

// Package/import checking diagnostics.
CARBON_DIAGNOSTIC_KIND(CppInteropFuzzing)
CARBON_DIAGNOSTIC_KIND(CppInteropMissingLibrary)
CARBON_DIAGNOSTIC_KIND(CppInteropParseError)
CARBON_DIAGNOSTIC_KIND(CppInteropParseWarning)
CARBON_DIAGNOSTIC_KIND(IncorrectExtension)
CARBON_DIAGNOSTIC_KIND(IncorrectExtensionImplNote)
CARBON_DIAGNOSTIC_KIND(DuplicateLibraryApi)
CARBON_DIAGNOSTIC_KIND(DuplicateMainApi)
CARBON_DIAGNOSTIC_KIND(LibraryApiNotFound)
CARBON_DIAGNOSTIC_KIND(ImportNotFound)
CARBON_DIAGNOSTIC_KIND(ImportCycleDetected)
CARBON_DIAGNOSTIC_KIND(ExplicitMainPackage)
CARBON_DIAGNOSTIC_KIND(ExplicitMainLibrary)
CARBON_DIAGNOSTIC_KIND(CppPackageDeclaration)
CARBON_DIAGNOSTIC_KIND(ImportMainPackage)
CARBON_DIAGNOSTIC_KIND(ImportMainDefaultLibrary)
CARBON_DIAGNOSTIC_KIND(ImportCurrentPackageByName)
CARBON_DIAGNOSTIC_KIND(ImportSelf)
CARBON_DIAGNOSTIC_KIND(ExplicitImportApi)
CARBON_DIAGNOSTIC_KIND(RepeatedImport)
CARBON_DIAGNOSTIC_KIND(FirstImported)
CARBON_DIAGNOSTIC_KIND(ExportFromImpl)
CARBON_DIAGNOSTIC_KIND(MissingDefinitionInImpl)
CARBON_DIAGNOSTIC_KIND(MissingGenericFunctionDefinition)
CARBON_DIAGNOSTIC_KIND(MissingGenericFunctionDefinitionHere)

// Merge-related redeclaration checking.
CARBON_DIAGNOSTIC_KIND(RedeclPrevDecl)
CARBON_DIAGNOSTIC_KIND(RedeclRedundant)
CARBON_DIAGNOSTIC_KIND(RedeclPrevDef)
CARBON_DIAGNOSTIC_KIND(RedeclRedef)
CARBON_DIAGNOSTIC_KIND(RedeclExternMismatch)
CARBON_DIAGNOSTIC_KIND(RedeclImportedImpl)
CARBON_DIAGNOSTIC_KIND(RedeclParamListDiffers)
CARBON_DIAGNOSTIC_KIND(RedeclParamListPrevious)
CARBON_DIAGNOSTIC_KIND(RedeclParamCountDiffers)
CARBON_DIAGNOSTIC_KIND(RedeclParamCountPrevious)
CARBON_DIAGNOSTIC_KIND(RedeclParamDiffers)
CARBON_DIAGNOSTIC_KIND(RedeclParamDiffersType)
CARBON_DIAGNOSTIC_KIND(RedeclParamPrevious)
CARBON_DIAGNOSTIC_KIND(RedeclParamSyntaxDiffers)
CARBON_DIAGNOSTIC_KIND(RedeclParamSyntaxPrevious)
CARBON_DIAGNOSTIC_KIND(ExternLibraryInImporter)
CARBON_DIAGNOSTIC_KIND(ExternLibraryIncorrect)
CARBON_DIAGNOSTIC_KIND(ExternLibraryExpected)
CARBON_DIAGNOSTIC_KIND(ExternRequiresDeclInApiFile)

// Namespace checking.
CARBON_DIAGNOSTIC_KIND(NamespaceDeclNotAtTopLevel)

// Function call checking.
CARBON_DIAGNOSTIC_KIND(AddrSelfIsNonRef)
CARBON_DIAGNOSTIC_KIND(CallArgCountMismatch)
CARBON_DIAGNOSTIC_KIND(CallToNonCallable)
CARBON_DIAGNOSTIC_KIND(GenericParamMustBeConstant)
CARBON_DIAGNOSTIC_KIND(ImplictParamMustBeConstant)
CARBON_DIAGNOSTIC_KIND(IncompleteReturnTypeHere)
CARBON_DIAGNOSTIC_KIND(InCallToEntity)
CARBON_DIAGNOSTIC_KIND(InCallToFunction)
CARBON_DIAGNOSTIC_KIND(InCallToFunctionParam)
CARBON_DIAGNOSTIC_KIND(MissingObjectInMethodCall)
CARBON_DIAGNOSTIC_KIND(SelfParameterNotAllowed)

// Function declaration checking.
CARBON_DIAGNOSTIC_KIND(DefinedAbstractFunction)
CARBON_DIAGNOSTIC_KIND(FunctionRedeclReturnTypeDiffers)
CARBON_DIAGNOSTIC_KIND(FunctionRedeclReturnTypeDiffersNoReturn)
CARBON_DIAGNOSTIC_KIND(FunctionRedeclReturnTypePrevious)
CARBON_DIAGNOSTIC_KIND(FunctionRedeclReturnTypePreviousNoReturn)
CARBON_DIAGNOSTIC_KIND(InvalidMainRunSignature)
CARBON_DIAGNOSTIC_KIND(MissingReturnStatement)
CARBON_DIAGNOSTIC_KIND(UnknownBuiltinFunctionName)
CARBON_DIAGNOSTIC_KIND(InvalidBuiltinSignature)

// Class checking.
CARBON_DIAGNOSTIC_KIND(AdaptDeclRepeated)
CARBON_DIAGNOSTIC_KIND(AdaptWithBase)
CARBON_DIAGNOSTIC_KIND(AdaptWithFields)
CARBON_DIAGNOSTIC_KIND(AdaptWithVirtual)
CARBON_DIAGNOSTIC_KIND(AdaptWithBaseHere)
CARBON_DIAGNOSTIC_KIND(AdaptWithFieldHere)
CARBON_DIAGNOSTIC_KIND(AdaptWithVirtualHere)
CARBON_DIAGNOSTIC_KIND(BaseDeclRepeated)
CARBON_DIAGNOSTIC_KIND(BaseIsFinal)
CARBON_DIAGNOSTIC_KIND(BaseMissingExtend)
CARBON_DIAGNOSTIC_KIND(BaseDeclAfterFieldDecl)
CARBON_DIAGNOSTIC_KIND(ClassAbstractHere)
CARBON_DIAGNOSTIC_KIND(ClassForwardDeclaredHere)
CARBON_DIAGNOSTIC_KIND(ClassSpecificDeclOutsideClass)
CARBON_DIAGNOSTIC_KIND(ClassSpecificDeclPrevious)
CARBON_DIAGNOSTIC_KIND(ClassIncompleteWithinDefinition)
CARBON_DIAGNOSTIC_KIND(ImplWithoutBase)

// Deduction.
CARBON_DIAGNOSTIC_KIND(DeductionIncomplete)
CARBON_DIAGNOSTIC_KIND(DeductionInconsistent)
CARBON_DIAGNOSTIC_KIND(DeductionGenericHere)
CARBON_DIAGNOSTIC_KIND(InitializingGenericParam)
CARBON_DIAGNOSTIC_KIND(CompTimeArgumentNotConstant)

// Export checking.
CARBON_DIAGNOSTIC_KIND(ExportNotImportedEntity)
CARBON_DIAGNOSTIC_KIND(ExportNotImportedEntitySource)
CARBON_DIAGNOSTIC_KIND(ExportRedundant)
CARBON_DIAGNOSTIC_KIND(ExportPrevious)

// Interface checking.
CARBON_DIAGNOSTIC_KIND(InterfaceForwardDeclaredHere)
CARBON_DIAGNOSTIC_KIND(InterfaceUndefinedWithinDefinition)

// Impl checking.
CARBON_DIAGNOSTIC_KIND(AssociatedConstantHere)
CARBON_DIAGNOSTIC_KIND(AssociatedConstantNotConstantAfterConversion)
CARBON_DIAGNOSTIC_KIND(AssociatedFunctionHere)
CARBON_DIAGNOSTIC_KIND(ExtendImplForall)
CARBON_DIAGNOSTIC_KIND(ExtendImplOutsideClass)
CARBON_DIAGNOSTIC_KIND(ExtendImplSelfAs)
CARBON_DIAGNOSTIC_KIND(ExtendImplSelfAsDefault)
CARBON_DIAGNOSTIC_KIND(ImplAccessMemberBeforeComplete)
CARBON_DIAGNOSTIC_KIND(ImplAsNonFacetType)
CARBON_DIAGNOSTIC_KIND(ImplAsOutsideClass)
CARBON_DIAGNOSTIC_KIND(ImplAssociatedConstantNeedsValue)
CARBON_DIAGNOSTIC_KIND(ImplFunctionWithNonFunction)
CARBON_DIAGNOSTIC_KIND(ImplMissingDefinition)
CARBON_DIAGNOSTIC_KIND(ImplMissingFunction)
CARBON_DIAGNOSTIC_KIND(ImplPreviousDefinition)
CARBON_DIAGNOSTIC_KIND(ImplRedefinition)
CARBON_DIAGNOSTIC_KIND(ImplOfUndefinedInterface)

// Impl lookup.
CARBON_DIAGNOSTIC_KIND(MissingImplInMemberAccess)
CARBON_DIAGNOSTIC_KIND(MissingImplInMemberAccessNote)

// Let declaration checking.
CARBON_DIAGNOSTIC_KIND(ExpectedInitializerAfterLet)
CARBON_DIAGNOSTIC_KIND(ExpectedSymbolicBindingInAssociatedConstant)

// Qualified declaration name checking.
CARBON_DIAGNOSTIC_KIND(QualifiedDeclOutsidePackage)
CARBON_DIAGNOSTIC_KIND(QualifiedDeclOutsidePackageSource)
CARBON_DIAGNOSTIC_KIND(QualifiedDeclOutsideScopeEntity)
CARBON_DIAGNOSTIC_KIND(QualifiedDeclInIncompleteClassScope)
CARBON_DIAGNOSTIC_KIND(QualifiedDeclInUndefinedInterfaceScope)

// Name lookup.
CARBON_DIAGNOSTIC_KIND(FromExtendHere)
CARBON_DIAGNOSTIC_KIND(InNameLookup)
CARBON_DIAGNOSTIC_KIND(NameAmbiguousDueToExtend)
CARBON_DIAGNOSTIC_KIND(NameNotFound)
CARBON_DIAGNOSTIC_KIND(MemberNameNotFound)
CARBON_DIAGNOSTIC_KIND(MemberNameNotFoundInScope)
CARBON_DIAGNOSTIC_KIND(NoPeriodSelfForDesignator)
CARBON_DIAGNOSTIC_KIND(UsedBeforeInitialization)

CARBON_DIAGNOSTIC_KIND(AbstractTypeInAdaptDecl)
CARBON_DIAGNOSTIC_KIND(AbstractTypeInFieldDecl)
CARBON_DIAGNOSTIC_KIND(AbstractTypeInFunctionReturnType)
CARBON_DIAGNOSTIC_KIND(AbstractTypeInInit)
CARBON_DIAGNOSTIC_KIND(AbstractTypeInVarPattern)
CARBON_DIAGNOSTIC_KIND(AddrOfEphemeralRef)
CARBON_DIAGNOSTIC_KIND(AddrOfNonRef)
CARBON_DIAGNOSTIC_KIND(AddrOnNonSelfParam)
CARBON_DIAGNOSTIC_KIND(AddrOnNonPointerType)
CARBON_DIAGNOSTIC_KIND(ArrayBoundTooLarge)
CARBON_DIAGNOSTIC_KIND(ArrayBoundNegative)
CARBON_DIAGNOSTIC_KIND(ArrayIndexOutOfBounds)
CARBON_DIAGNOSTIC_KIND(ArrayInitFromLiteralArgCountMismatch)
CARBON_DIAGNOSTIC_KIND(ArrayInitFromExprArgCountMismatch)
CARBON_DIAGNOSTIC_KIND(ArrayInitDependentBound)
CARBON_DIAGNOSTIC_KIND(ArrowOperatorOfNonPointer)
CARBON_DIAGNOSTIC_KIND(AssignmentToNonAssignable)
CARBON_DIAGNOSTIC_KIND(BreakOutsideLoop)
CARBON_DIAGNOSTIC_KIND(CompileTimeDivisionByZero)
CARBON_DIAGNOSTIC_KIND(CompileTimeIntegerOverflow)
CARBON_DIAGNOSTIC_KIND(CompileTimeIntegerNegateOverflow)
CARBON_DIAGNOSTIC_KIND(CompileTimeFloatBitWidth)
CARBON_DIAGNOSTIC_KIND(CompileTimeShiftNegative)
CARBON_DIAGNOSTIC_KIND(CompileTimeShiftOutOfRange)
CARBON_DIAGNOSTIC_KIND(CompileTimeUnsizedShiftOutOfRange)
CARBON_DIAGNOSTIC_KIND(ContinueOutsideLoop)
CARBON_DIAGNOSTIC_KIND(CopyOfUncopyableType)
CARBON_DIAGNOSTIC_KIND(CoreNameNotFound)
CARBON_DIAGNOSTIC_KIND(CoreNotFound)
CARBON_DIAGNOSTIC_KIND(DerefOfNonPointer)
CARBON_DIAGNOSTIC_KIND(DerefOfType)
CARBON_DIAGNOSTIC_KIND(CompileTimeBindingInVarDecl)
CARBON_DIAGNOSTIC_KIND(CompoundMemberAccessDoesNotUseBase)
CARBON_DIAGNOSTIC_KIND(RealMantissaTooLargeForI64)
CARBON_DIAGNOSTIC_KIND(RealExponentTooLargeForI64)
CARBON_DIAGNOSTIC_KIND(NameDeclDuplicate)
CARBON_DIAGNOSTIC_KIND(NameDeclPrevious)
CARBON_DIAGNOSTIC_KIND(NameUseBeforeDecl)
CARBON_DIAGNOSTIC_KIND(NameUseBeforeDeclNote)
CARBON_DIAGNOSTIC_KIND(RepeatedConst)
CARBON_DIAGNOSTIC_KIND(IncompleteTypeInAdaptDecl)
CARBON_DIAGNOSTIC_KIND(IncompleteTypeInAssociatedDecl)
CARBON_DIAGNOSTIC_KIND(IncompleteTypeInBaseDecl)
CARBON_DIAGNOSTIC_KIND(IncompleteTypeInBindingDecl)
CARBON_DIAGNOSTIC_KIND(IncompleteTypeInConversion)
CARBON_DIAGNOSTIC_KIND(IncompleteTypeInFieldDecl)
CARBON_DIAGNOSTIC_KIND(IncompleteTypeInFunctionParam)
CARBON_DIAGNOSTIC_KIND(IncompleteTypeInFunctionReturnType)
CARBON_DIAGNOSTIC_KIND(IncompleteTypeInMonomorphization)
CARBON_DIAGNOSTIC_KIND(IncompleteTypeInMemberAccess)
CARBON_DIAGNOSTIC_KIND(IncompleteTypeInValueConversion)
CARBON_DIAGNOSTIC_KIND(InCopy)
CARBON_DIAGNOSTIC_KIND(IntTooLargeForType)
CARBON_DIAGNOSTIC_KIND(IntWidthNotMultipleOf8)
CARBON_DIAGNOSTIC_KIND(IntWidthNotPositive)
CARBON_DIAGNOSTIC_KIND(IntWidthTooLarge)
CARBON_DIAGNOSTIC_KIND(InvalidArrayExpr)
CARBON_DIAGNOSTIC_KIND(NegativeIntInUnsignedType)
CARBON_DIAGNOSTIC_KIND(NonConstantCallToCompTimeOnlyFunction)
CARBON_DIAGNOSTIC_KIND(CompTimeOnlyFunctionHere)
CARBON_DIAGNOSTIC_KIND(TypeNotIndexable)
CARBON_DIAGNOSTIC_KIND(SelfOutsideImplicitParamList)
CARBON_DIAGNOSTIC_KIND(StructInitElementCountMismatch)
CARBON_DIAGNOSTIC_KIND(StructInitMissingFieldInLiteral)
CARBON_DIAGNOSTIC_KIND(StructInitMissingFieldInConversion)
CARBON_DIAGNOSTIC_KIND(StructNameDuplicate)
CARBON_DIAGNOSTIC_KIND(StructNamePrevious)
CARBON_DIAGNOSTIC_KIND(TupleIndexNotConstant)
CARBON_DIAGNOSTIC_KIND(TupleIndexOnANonTupleType)
CARBON_DIAGNOSTIC_KIND(TupleIndexOutOfBounds)
CARBON_DIAGNOSTIC_KIND(TupleInitElementCountMismatch)
CARBON_DIAGNOSTIC_KIND(ReturnedVarHere)
CARBON_DIAGNOSTIC_KIND(ReturnedVarShadowed)
CARBON_DIAGNOSTIC_KIND(ReturnedVarWithNoReturnType)
CARBON_DIAGNOSTIC_KIND(ReturnedVarWrongType)
CARBON_DIAGNOSTIC_KIND(ReturnExprWithReturnedVar)
CARBON_DIAGNOSTIC_KIND(ReturnVarWithNoReturnedVar)
CARBON_DIAGNOSTIC_KIND(ReturnStatementDisallowExpr)
CARBON_DIAGNOSTIC_KIND(ReturnTypeHereNote)
CARBON_DIAGNOSTIC_KIND(ReturnTypeOmittedNote)
CARBON_DIAGNOSTIC_KIND(ReturnStatementMissingExpr)
CARBON_DIAGNOSTIC_KIND(ImplicitAsConversionFailure)
CARBON_DIAGNOSTIC_KIND(ExplicitAsConversionFailure)
CARBON_DIAGNOSTIC_KIND(TypeExprEvaluationFailure)
CARBON_DIAGNOSTIC_KIND(UnexpectedDeclNameParams)
CARBON_DIAGNOSTIC_KIND(QualifiedNameInNonScope)
CARBON_DIAGNOSTIC_KIND(QualifiedNameNonScopeEntity)
CARBON_DIAGNOSTIC_KIND(QualifiedExprInIncompleteClassScope)
CARBON_DIAGNOSTIC_KIND(QualifiedExprInUndefinedInterfaceScope)
CARBON_DIAGNOSTIC_KIND(QualifiedExprUnsupported)
CARBON_DIAGNOSTIC_KIND(QualifiedExprNameNotFound)
CARBON_DIAGNOSTIC_KIND(UseOfNonExprAsValue)

// Modifier checking.
CARBON_DIAGNOSTIC_KIND(ModifierNotAllowedOnDeclaration)
CARBON_DIAGNOSTIC_KIND(ModifierOnlyAllowedOnDefinition)
CARBON_DIAGNOSTIC_KIND(ModifierPrivateNotAllowed)
CARBON_DIAGNOSTIC_KIND(ModifierProtectedNotAllowed)
CARBON_DIAGNOSTIC_KIND(ModifierVirtualNotAllowed)
CARBON_DIAGNOSTIC_KIND(ModifierAbstractNotAllowed)
CARBON_DIAGNOSTIC_KIND(ModifierRequiresClass)
CARBON_DIAGNOSTIC_KIND(ModifierRequiresInterface)
CARBON_DIAGNOSTIC_KIND(ModifierExternNotAllowed)
CARBON_DIAGNOSTIC_KIND(ModifierNotInContext)
CARBON_DIAGNOSTIC_KIND(ModifierRepeated)
CARBON_DIAGNOSTIC_KIND(ModifierNotAllowedWith)
CARBON_DIAGNOSTIC_KIND(ModifierMustAppearBefore)
CARBON_DIAGNOSTIC_KIND(ModifierPrevious)
CARBON_DIAGNOSTIC_KIND(ExternLibraryOnDefinition)
CARBON_DIAGNOSTIC_KIND(ExternLibraryIsCurrentLibrary)

// Access modifiers.
CARBON_DIAGNOSTIC_KIND(ClassMemberDeclaration)
CARBON_DIAGNOSTIC_KIND(ClassInvalidMemberAccess)

// Alias diagnostics.
CARBON_DIAGNOSTIC_KIND(AliasRequiresNameRef)

// Where operator and its requirements.
CARBON_DIAGNOSTIC_KIND(AssociatedConstantWithDifferentValues)
CARBON_DIAGNOSTIC_KIND(ImplsOnNonFacetType)
CARBON_DIAGNOSTIC_KIND(WhereOnNonFacetType)

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

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

#undef CARBON_DIAGNOSTIC_KIND
