From 86e340caf00b2d337ddb839e646085bf2222be3b Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 16 Dec 2019 22:11:31 -0800 Subject: [PATCH] Adapt llvmorg-10-init-12036-g3b9715cb2193: handleDeclOccurence -> handleDeclOccurrence --- src/indexer.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/indexer.cc b/src/indexer.cc index 4d7d85f2..c1e20c44 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -678,10 +678,13 @@ public: public: IndexDataConsumer(IndexParam ¶m) : param(param) {} void initialize(ASTContext &ctx) override { this->ctx = param.ctx = &ctx; } - bool handleDeclOccurence(const Decl *d, index::SymbolRoleSet roles, - ArrayRef relations, - SourceLocation src_loc, - ASTNodeInfo ast_node) override { +#if LLVM_VERSION_MAJOR < 10 // llvmorg-10-init-12036-g3b9715cb219 +# define handleDeclOccurrence handleDeclOccurence +#endif + bool handleDeclOccurrence(const Decl *d, index::SymbolRoleSet roles, + ArrayRef relations, + SourceLocation src_loc, + ASTNodeInfo ast_node) override { if (!param.no_linkage) { if (auto *nd = dyn_cast(d); nd && nd->hasLinkage()) ;