diff --git a/src/clang_tu.hh b/src/clang_tu.hh index cba38e56..b3288eb7 100644 --- a/src/clang_tu.hh +++ b/src/clang_tu.hh @@ -21,6 +21,11 @@ namespace vfs = clang::vfs; #define isAsciiIdentifierContinue isIdentifierBody #endif +#if LLVM_VERSION_MAJOR >= 19 +#define startswith starts_with +#define endswith ends_with +#endif + namespace ccls { #if LLVM_VERSION_MAJOR < 19 std::string pathFromFileEntry(const clang::FileEntry &file); diff --git a/src/indexer.hh b/src/indexer.hh index 11e7133b..723cda8b 100644 --- a/src/indexer.hh +++ b/src/indexer.hh @@ -18,6 +18,11 @@ #include #include +#if LLVM_VERSION_MAJOR >= 19 +#define startswith starts_with +#define endswith ends_with +#endif + namespace std { template <> struct hash { std::size_t operator()(clang::FileID fid) const { return fid.getHashValue(); }