diff --git a/src/indexer.cc b/src/indexer.cc index 50bb299c..68d3f810 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -28,6 +28,14 @@ using namespace clang; +#if LLVM_VERSION_MAJOR >= 18 // llvmorg-18-init-10631-gedd690b02e16 +#define TTK_Class TagTypeKind::Class +#define TTK_Enum TagTypeKind::Enum +#define TTK_Interface TagTypeKind::Interface +#define TTK_Struct TagTypeKind::Struct +#define TTK_Union TagTypeKind::Union +#endif + namespace ccls { namespace { diff --git a/src/messages/textDocument_completion.cc b/src/messages/textDocument_completion.cc index 8a7394ef..ce769d4d 100644 --- a/src/messages/textDocument_completion.cc +++ b/src/messages/textDocument_completion.cc @@ -17,6 +17,10 @@ #include #endif +#if LLVM_VERSION_MAJOR >= 18 // llvmorg-18-init-10631-gedd690b02e16 +#define TTK_Struct TagTypeKind::Struct +#endif + namespace ccls { using namespace clang; using namespace llvm;