// 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."
#define CARBON_DIAGNOSTIC_KIND(Name)
#endif

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

CARBON_DIAGNOSTIC_KIND(DriverInstallInvalid)
CARBON_DIAGNOSTIC_KIND(DriverCommandLineParseFailed)
CARBON_DIAGNOSTIC_KIND(CompilePhaseFlagConflict)
CARBON_DIAGNOSTIC_KIND(CompilePreludeManifestError)
CARBON_DIAGNOSTIC_KIND(CompileInputNotRegularFile)
CARBON_DIAGNOSTIC_KIND(CompileOutputFileOpenError)
CARBON_DIAGNOSTIC_KIND(CompileTargetInvalid)
CARBON_DIAGNOSTIC_KIND(FailureBuildingRuntimes)
CARBON_DIAGNOSTIC_KIND(FailureRunningClang)
CARBON_DIAGNOSTIC_KIND(FailureRunningClangToLink)
CARBON_DIAGNOSTIC_KIND(FormatMultipleFilesToOneOutput)
CARBON_DIAGNOSTIC_KIND(ToolFuzzingDisallowed)

// ============================================================================
// 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(DumpSemIRRangeMissingEnd)
CARBON_DIAGNOSTIC_KIND(DumpSemIRRangeMissingBegin)
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)

CARBON_DIAGNOSTIC_KIND(CharLiteralEmpty)
CARBON_DIAGNOSTIC_KIND(CharLiteralInvalidUTF8)
CARBON_DIAGNOSTIC_KIND(CharLiteralOverflow)
CARBON_DIAGNOSTIC_KIND(CharLiteralRaw)
CARBON_DIAGNOSTIC_KIND(CharLiteralHexEscape)
CARBON_DIAGNOSTIC_KIND(CharLiteralControlCharacter)
CARBON_DIAGNOSTIC_KIND(CharLiteralUnderflow)

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

CARBON_DIAGNOSTIC_KIND(BinaryOperatorRequiresWhitespace)
CARBON_DIAGNOSTIC_KIND(ExpectedArrayComma)
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(ExpectedGenericBindingPatternAfterTemplate)
CARBON_DIAGNOSTIC_KIND(ExpectedParenAfter)
CARBON_DIAGNOSTIC_KIND(ExpectedExprSemi)
CARBON_DIAGNOSTIC_KIND(ExpectedStatementSemi)
CARBON_DIAGNOSTIC_KIND(ExpectedStructLiteralField)
CARBON_DIAGNOSTIC_KIND(ExpectedVarAfterReturned)
CARBON_DIAGNOSTIC_KIND(ExpectedChoiceDefinition)
CARBON_DIAGNOSTIC_KIND(ExpectedChoiceAlternativeName)
CARBON_DIAGNOSTIC_KIND(NestedVar)
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(ExpectedMatchCaseArrow)
CARBON_DIAGNOSTIC_KIND(ExpectedMatchCaseBlock)
CARBON_DIAGNOSTIC_KIND(ExpectedMatchCaseGuardCloseParen)
CARBON_DIAGNOSTIC_KIND(ExpectedMatchCaseGuardOpenParen)
CARBON_DIAGNOSTIC_KIND(ExpectedMatchCases)
CARBON_DIAGNOSTIC_KIND(ExpectedMatchCasesBlock)
CARBON_DIAGNOSTIC_KIND(UnexpectedTokenInMatchCasesBlock)
CARBON_DIAGNOSTIC_KIND(UnreachableMatchCase)

// 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(ExpectedStringAfterInline)
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(ExpectedAfterBase)
CARBON_DIAGNOSTIC_KIND(ExpectedBuiltinName)
CARBON_DIAGNOSTIC_KIND(ExpectedFieldIdentifier)
CARBON_DIAGNOSTIC_KIND(ExpectedFieldColon)
CARBON_DIAGNOSTIC_KIND(ImplExpectedAfterForall)
CARBON_DIAGNOSTIC_KIND(ImplExpectedAs)
CARBON_DIAGNOSTIC_KIND(ExpectedAssociatedConstantIdentifier)
CARBON_DIAGNOSTIC_KIND(ExpectedAssociatedConstantColonExclaim)

// 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(InCppInclude)
CARBON_DIAGNOSTIC_KIND(InCppModule)
CARBON_DIAGNOSTIC_KIND(InCppMacroExpansion)
CARBON_DIAGNOSTIC_KIND(ResolvingSpecificHere)
CARBON_DIAGNOSTIC_KIND(InCppTypeCompletion)

// Package/import checking diagnostics.
CARBON_DIAGNOSTIC_KIND(CppInteropFuzzing)
CARBON_DIAGNOSTIC_KIND(CppInteropMissingLibrary)
CARBON_DIAGNOSTIC_KIND(CppInteropDriverError)
CARBON_DIAGNOSTIC_KIND(CppInteropDriverWarning)
CARBON_DIAGNOSTIC_KIND(CppInteropParseError)
CARBON_DIAGNOSTIC_KIND(CppInteropParseWarning)
CARBON_DIAGNOSTIC_KIND(CppInteropParseNote)
CARBON_DIAGNOSTIC_KIND(InlineImportNotCpp)
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(MissingOwningDeclarationInApi)
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(CppCallArgTypeNotSupported)
CARBON_DIAGNOSTIC_KIND(CppOverloadingAmbiguousCandidatesFound)
CARBON_DIAGNOSTIC_KIND(CppOverloadingDeletedFunctionFound)
CARBON_DIAGNOSTIC_KIND(CppOverloadingNoViableFunctionFound)
CARBON_DIAGNOSTIC_KIND(CppTemplateFunctionNotSupported)
CARBON_DIAGNOSTIC_KIND(GenericParamMustBeConstant)
CARBON_DIAGNOSTIC_KIND(ImplictParamMustBeConstant)
CARBON_DIAGNOSTIC_KIND(IncompleteReturnTypeHere)
CARBON_DIAGNOSTIC_KIND(InCallToCppFunction)
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)
CARBON_DIAGNOSTIC_KIND(ThunkSignature)
CARBON_DIAGNOSTIC_KIND(ThunkCallee)

CARBON_DIAGNOSTIC_KIND(DestroyFunctionOutsideClass)
CARBON_DIAGNOSTIC_KIND(DestroyFunctionMissingSelf)
CARBON_DIAGNOSTIC_KIND(DestroyFunctionUnexpectedImplicitParam)
CARBON_DIAGNOSTIC_KIND(DestroyFunctionPositionalParams)
CARBON_DIAGNOSTIC_KIND(DestroyFunctionNonEmptyExplicitParams)
CARBON_DIAGNOSTIC_KIND(DestroyFunctionIncorrectReturnType)

// 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(GenericVirtual)
CARBON_DIAGNOSTIC_KIND(OverrideWithoutBase)
CARBON_DIAGNOSTIC_KIND(OverrideWithoutVirtualInBase)
CARBON_DIAGNOSTIC_KIND(VirtualWithoutSelf)

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

// 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(InterfaceIncompleteWithinDefinition)

// Impl checking.
CARBON_DIAGNOSTIC_KIND(AssociatedConstantHere)
CARBON_DIAGNOSTIC_KIND(AssociatedFunctionHere)
CARBON_DIAGNOSTIC_KIND(ExtendImplAsIncomplete)
CARBON_DIAGNOSTIC_KIND(ExtendImplForall)
CARBON_DIAGNOSTIC_KIND(ExtendImplOutsideClass)
CARBON_DIAGNOSTIC_KIND(ExtendImplSelfAs)
CARBON_DIAGNOSTIC_KIND(ExtendImplSelfAsDefault)
CARBON_DIAGNOSTIC_KIND(ImplAccessMemberBeforeSet)
CARBON_DIAGNOSTIC_KIND(ImplAsIncompleteFacetTypeDefinition)
CARBON_DIAGNOSTIC_KIND(ImplAsIncompleteFacetTypeRewrites)
CARBON_DIAGNOSTIC_KIND(ImplAsNonFacetType)
CARBON_DIAGNOSTIC_KIND(ImplAsOutsideClass)
CARBON_DIAGNOSTIC_KIND(ImplAssociatedConstantNeedsValue)
CARBON_DIAGNOSTIC_KIND(ImplFunctionWithNonFunction)
CARBON_DIAGNOSTIC_KIND(ImplLookupCycle)
CARBON_DIAGNOSTIC_KIND(ImplLookupCycleNote)
CARBON_DIAGNOSTIC_KIND(ImplMissingDefinition)
CARBON_DIAGNOSTIC_KIND(ImplMissingFunction)
CARBON_DIAGNOSTIC_KIND(ImplPreviousDefinition)
CARBON_DIAGNOSTIC_KIND(ImplRedefinition)
CARBON_DIAGNOSTIC_KIND(ImplOfNotOneInterface)
CARBON_DIAGNOSTIC_KIND(ImplUnusedBinding)
CARBON_DIAGNOSTIC_KIND(PoisonedImplLookupConcreteResult)
CARBON_DIAGNOSTIC_KIND(PoisonedImplLookupConcreteResultNoteBadImpl)
CARBON_DIAGNOSTIC_KIND(PoisonedImplLookupConcreteResultNotePreviousImpl)
CARBON_DIAGNOSTIC_KIND(ImplFinalOverlapsNonFinal)
CARBON_DIAGNOSTIC_KIND(ImplFinalOverlapsNonFinalNote)
CARBON_DIAGNOSTIC_KIND(ImplNonFinalSameTypeStructure)
CARBON_DIAGNOSTIC_KIND(ImplNonFinalSameTypeStructureNote)
CARBON_DIAGNOSTIC_KIND(FinalImplInvalidFile)
CARBON_DIAGNOSTIC_KIND(FinalImplOverlapsSameFile)
CARBON_DIAGNOSTIC_KIND(FinalImplOverlapsSameFileNote)
CARBON_DIAGNOSTIC_KIND(FinalImplOverlapsDifferentFile)
CARBON_DIAGNOSTIC_KIND(FinalImplOverlapsDifferentFileNote)

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

// Let declaration checking.
CARBON_DIAGNOSTIC_KIND(ExpectedInitializerAfterLet)

// 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(InCppNameLookup)
CARBON_DIAGNOSTIC_KIND(InCppOperatorLookup)
CARBON_DIAGNOSTIC_KIND(InNameLookup)
CARBON_DIAGNOSTIC_KIND(NameAmbiguousDueToExtend)
CARBON_DIAGNOSTIC_KIND(NameNotFound)
CARBON_DIAGNOSTIC_KIND(MemberNameNotFound)
CARBON_DIAGNOSTIC_KIND(MemberNameNotFoundInInstScope)
CARBON_DIAGNOSTIC_KIND(MemberNameNotFoundInSpecificScope)
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(EvalRequiresConstantValue)
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(IncompleteTypeInAssociatedConstantDecl)
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(CharTooLargeForType)
CARBON_DIAGNOSTIC_KIND(IntTooLargeForType)
CARBON_DIAGNOSTIC_KIND(FloatLiteralTooLargeForType)
CARBON_DIAGNOSTIC_KIND(FloatTooLargeForType)
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(StringLiteralTooLong)
CARBON_DIAGNOSTIC_KIND(StringLiteralTypeIncomplete)
CARBON_DIAGNOSTIC_KIND(StringLiteralTypeUnexpected)
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(PartialOnFinal)
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(ConversionFailure)
CARBON_DIAGNOSTIC_KIND(ConversionFailureNonTypeToFacet)
CARBON_DIAGNOSTIC_KIND(ConversionFailureFacetToFacet)
CARBON_DIAGNOSTIC_KIND(ConversionFailureTypeToFacet)
CARBON_DIAGNOSTIC_KIND(ConversionFailureNonRefToRef)
CARBON_DIAGNOSTIC_KIND(TypeExprEvaluationFailure)
CARBON_DIAGNOSTIC_KIND(UnexpectedDeclNameParams)
CARBON_DIAGNOSTIC_KIND(QualifiedNameInNonScope)
CARBON_DIAGNOSTIC_KIND(QualifiedNameNonScopeEntity)
CARBON_DIAGNOSTIC_KIND(QualifiedExprInIncompleteClassScope)
CARBON_DIAGNOSTIC_KIND(QualifiedExprInIncompleteFacetTypeScope)
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)

// Operator modifier checking.
CARBON_DIAGNOSTIC_KIND(ModifierNotAllowedOnOperator)

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

// Alias diagnostics.
CARBON_DIAGNOSTIC_KIND(AliasRequiresNameRef)

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

// Facet type resolution.
CARBON_DIAGNOSTIC_KIND(AssociatedConstantNotConstantAfterConversion)
CARBON_DIAGNOSTIC_KIND(AssociatedConstantWithDifferentValues)
CARBON_DIAGNOSTIC_KIND(RewriteForAssociatedFunction)
CARBON_DIAGNOSTIC_KIND(FacetTypeConstraintCycle)

// Facet type combination.
CARBON_DIAGNOSTIC_KIND(FacetTypeRequiredForTypeAndOperator)

// Generics.
CARBON_DIAGNOSTIC_KIND(GenericMissingExplicitParameters)

// Pattern matching diagnostics.
CARBON_DIAGNOSTIC_KIND(TuplePatternSizeDoesntMatchLiteral)

// ============================================================================
// CodeGen diagnostics
// ============================================================================

CARBON_DIAGNOSTIC_KIND(CodeGenUnableToEmit)

// ============================================================================
// Language server diagnostics
// ============================================================================

CARBON_DIAGNOSTIC_KIND(LanguageServerFileUnknown)
CARBON_DIAGNOSTIC_KIND(LanguageServerFileUnsupported)
CARBON_DIAGNOSTIC_KIND(LanguageServerMissingInputStream)
CARBON_DIAGNOSTIC_KIND(LanguageServerNotificationParseError)
CARBON_DIAGNOSTIC_KIND(LanguageServerTransportError)
CARBON_DIAGNOSTIC_KIND(LanguageServerUnexpectedReply)
CARBON_DIAGNOSTIC_KIND(LanguageServerUnsupportedNotification)

// Document handling.
CARBON_DIAGNOSTIC_KIND(LanguageServerOpenDuplicateFile)
CARBON_DIAGNOSTIC_KIND(LanguageServerCloseUnknownFile)
CARBON_DIAGNOSTIC_KIND(LanguageServerDiagnosticInWrongFile)

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

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

#undef CARBON_DIAGNOSTIC_KIND
