malaperle added inline comments.
================ Comment at: clangd/ClangdUnit.cpp:997 + DocumentHighlightKind Kind; + switch (Roles) { + case (unsigned)index::SymbolRole::Read: ---------------- With this code, I always get "text" kind. It's because index::SymbolRoleSet is a bitfield so you have to check the write, read bits. Something like: DocumentHighlightKind Kind = DocumentHighlightKind::Text; if (static_cast<index::SymbolRoleSet>(index::SymbolRole::Write) & Roles) { Kind = DocumentHighlightKind::Write; } else if (static_cast<index::SymbolRoleSet>(index::SymbolRole::Read) & Roles) { Kind = DocumentHighlightKind::Read; } https://reviews.llvm.org/D38425 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits