When building ccls with LLVM versions 10 to 14(I believe this also applies to v<10), the following compilation error occurs in ccls/src/message_handler.cc due to unsupported usage of llvm::is_contained with std::initializer_list:
/ccls/src/message_handler.cc: In member function ‘void ccls::MessageHandler::textDocument_semanticTokensRange(ccls::SemanticTokensRangeParams&, ccls::ReplyOnce&)’:/ccls/src/message_handler.cc:548:39: error: no matching function for call to ‘is_contained(<brace-enclosed initializer list>, ccls::SymbolKind&)’
This error occurs because llvm::is_contained with std::initializer_list is only available from LLVM 15 onward. llvm::is_contained with std::initializer_list is introduced in the latest commit Support LSP semantic tokens
Observed behavior
When building ccls with LLVM versions 10 to 14(I believe this also applies to v<10), the following compilation error occurs in
ccls/src/message_handler.cc
due to unsupported usage ofllvm::is_contained
withstd::initializer_list
:/ccls/src/message_handler.cc: In member function ‘void ccls::MessageHandler::textDocument_semanticTokensRange(ccls::SemanticTokensRangeParams&, ccls::ReplyOnce&)’:
/ccls/src/message_handler.cc:548:39: error: no matching function for call to ‘is_contained(<brace-enclosed initializer list>, ccls::SymbolKind&)’
This error occurs becausellvm::is_contained
withstd::initializer_list
is only available from LLVM 15 onward.llvm::is_contained
withstd::initializer_list
is introduced in the latest commit Support LSP semantic tokens