From b4f8d68e2e48a27ff2a6eea6155873cdbfc8ad38 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 30 Apr 2019 03:14:45 -0400 Subject: [PATCH] translate-c: fix using wrong enum closes #2385 --- src/zig_clang.cpp | 148 +++++++++++++++++++++++----------------------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/src/zig_clang.cpp b/src/zig_clang.cpp index 901f702275..17ee800059 100644 --- a/src/zig_clang.cpp +++ b/src/zig_clang.cpp @@ -801,80 +801,80 @@ static_assert((clang::APValue::ValueKind)ZigClangAPValueAddrLabelDiff == clang:: void ZigClang_detect_enum_DeclKind(clang::Decl::Kind x) { switch (x) { - case ZigClangDeclAccessSpec: - case ZigClangDeclBlock: - case ZigClangDeclCaptured: - case ZigClangDeclClassScopeFunctionSpecialization: - case ZigClangDeclEmpty: - case ZigClangDeclExport: - case ZigClangDeclExternCContext: - case ZigClangDeclFileScopeAsm: - case ZigClangDeclFriend: - case ZigClangDeclFriendTemplate: - case ZigClangDeclImport: - case ZigClangDeclLinkageSpec: - case ZigClangDeclLabel: - case ZigClangDeclNamespace: - case ZigClangDeclNamespaceAlias: - case ZigClangDeclObjCCompatibleAlias: - case ZigClangDeclObjCCategory: - case ZigClangDeclObjCCategoryImpl: - case ZigClangDeclObjCImplementation: - case ZigClangDeclObjCInterface: - case ZigClangDeclObjCProtocol: - case ZigClangDeclObjCMethod: - case ZigClangDeclObjCProperty: - case ZigClangDeclBuiltinTemplate: - case ZigClangDeclClassTemplate: - case ZigClangDeclFunctionTemplate: - case ZigClangDeclTypeAliasTemplate: - case ZigClangDeclVarTemplate: - case ZigClangDeclTemplateTemplateParm: - case ZigClangDeclEnum: - case ZigClangDeclRecord: - case ZigClangDeclCXXRecord: - case ZigClangDeclClassTemplateSpecialization: - case ZigClangDeclClassTemplatePartialSpecialization: - case ZigClangDeclTemplateTypeParm: - case ZigClangDeclObjCTypeParam: - case ZigClangDeclTypeAlias: - case ZigClangDeclTypedef: - case ZigClangDeclUnresolvedUsingTypename: - case ZigClangDeclUsing: - case ZigClangDeclUsingDirective: - case ZigClangDeclUsingPack: - case ZigClangDeclUsingShadow: - case ZigClangDeclConstructorUsingShadow: - case ZigClangDeclBinding: - case ZigClangDeclField: - case ZigClangDeclObjCAtDefsField: - case ZigClangDeclObjCIvar: - case ZigClangDeclFunction: - case ZigClangDeclCXXDeductionGuide: - case ZigClangDeclCXXMethod: - case ZigClangDeclCXXConstructor: - case ZigClangDeclCXXConversion: - case ZigClangDeclCXXDestructor: - case ZigClangDeclMSProperty: - case ZigClangDeclNonTypeTemplateParm: - case ZigClangDeclVar: - case ZigClangDeclDecomposition: - case ZigClangDeclImplicitParam: - case ZigClangDeclOMPCapturedExpr: - case ZigClangDeclParmVar: - case ZigClangDeclVarTemplateSpecialization: - case ZigClangDeclVarTemplatePartialSpecialization: - case ZigClangDeclEnumConstant: - case ZigClangDeclIndirectField: - case ZigClangDeclOMPDeclareReduction: - case ZigClangDeclUnresolvedUsingValue: - case ZigClangDeclOMPRequires: - case ZigClangDeclOMPThreadPrivate: - case ZigClangDeclObjCPropertyImpl: - case ZigClangDeclPragmaComment: - case ZigClangDeclPragmaDetectMismatch: - case ZigClangDeclStaticAssert: - case ZigClangDeclTranslationUnit: + case clang::Decl::AccessSpec: + case clang::Decl::Block: + case clang::Decl::Captured: + case clang::Decl::ClassScopeFunctionSpecialization: + case clang::Decl::Empty: + case clang::Decl::Export: + case clang::Decl::ExternCContext: + case clang::Decl::FileScopeAsm: + case clang::Decl::Friend: + case clang::Decl::FriendTemplate: + case clang::Decl::Import: + case clang::Decl::LinkageSpec: + case clang::Decl::Label: + case clang::Decl::Namespace: + case clang::Decl::NamespaceAlias: + case clang::Decl::ObjCCompatibleAlias: + case clang::Decl::ObjCCategory: + case clang::Decl::ObjCCategoryImpl: + case clang::Decl::ObjCImplementation: + case clang::Decl::ObjCInterface: + case clang::Decl::ObjCProtocol: + case clang::Decl::ObjCMethod: + case clang::Decl::ObjCProperty: + case clang::Decl::BuiltinTemplate: + case clang::Decl::ClassTemplate: + case clang::Decl::FunctionTemplate: + case clang::Decl::TypeAliasTemplate: + case clang::Decl::VarTemplate: + case clang::Decl::TemplateTemplateParm: + case clang::Decl::Enum: + case clang::Decl::Record: + case clang::Decl::CXXRecord: + case clang::Decl::ClassTemplateSpecialization: + case clang::Decl::ClassTemplatePartialSpecialization: + case clang::Decl::TemplateTypeParm: + case clang::Decl::ObjCTypeParam: + case clang::Decl::TypeAlias: + case clang::Decl::Typedef: + case clang::Decl::UnresolvedUsingTypename: + case clang::Decl::Using: + case clang::Decl::UsingDirective: + case clang::Decl::UsingPack: + case clang::Decl::UsingShadow: + case clang::Decl::ConstructorUsingShadow: + case clang::Decl::Binding: + case clang::Decl::Field: + case clang::Decl::ObjCAtDefsField: + case clang::Decl::ObjCIvar: + case clang::Decl::Function: + case clang::Decl::CXXDeductionGuide: + case clang::Decl::CXXMethod: + case clang::Decl::CXXConstructor: + case clang::Decl::CXXConversion: + case clang::Decl::CXXDestructor: + case clang::Decl::MSProperty: + case clang::Decl::NonTypeTemplateParm: + case clang::Decl::Var: + case clang::Decl::Decomposition: + case clang::Decl::ImplicitParam: + case clang::Decl::OMPCapturedExpr: + case clang::Decl::ParmVar: + case clang::Decl::VarTemplateSpecialization: + case clang::Decl::VarTemplatePartialSpecialization: + case clang::Decl::EnumConstant: + case clang::Decl::IndirectField: + case clang::Decl::OMPDeclareReduction: + case clang::Decl::UnresolvedUsingValue: + case clang::Decl::OMPRequires: + case clang::Decl::OMPThreadPrivate: + case clang::Decl::ObjCPropertyImpl: + case clang::Decl::PragmaComment: + case clang::Decl::PragmaDetectMismatch: + case clang::Decl::StaticAssert: + case clang::Decl::TranslationUnit: break; } }