[libclang] Add `CXSymbolRole role` to CXIdxEntityRefInfo
authorFangrui Song <maskray@google.com>
Mon, 12 Feb 2018 17:42:09 +0000 (17:42 +0000)
committerFangrui Song <maskray@google.com>
Mon, 12 Feb 2018 17:42:09 +0000 (17:42 +0000)
commit31b97194e65a55b75f10155c7216f0cf9124573e
treeee3bb710b3cd8cd4deb7301518f462222fe32693
parentb0a17edff7f8873a33e304077b7528e2ed09e36b
[libclang] Add `CXSymbolRole role` to CXIdxEntityRefInfo

Summary:
CXIdxEntityRefInfo contains the member `CXIdxEntityRefKind kind;` to
differentiate implicit and direct calls. However, there are more roles
defined in SymbolRole. Among them, `Read/Write` are probably the most
useful ones as they can be used to differentiate Read/Write occurrences
of a symbol for document highlight in a text document.

See `export namespace DocumentHighlightKind`
on https://microsoft.github.io/language-server-protocol/specification

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D42895

llvm-svn: 324914
clang/include/clang-c/Index.h
clang/include/clang/Index/IndexSymbol.h
clang/test/Index/index-refs.cpp
clang/test/Index/index-subscripting-literals.m
clang/tools/c-index-test/c-index-test.c
clang/tools/libclang/CXIndexDataConsumer.cpp
clang/tools/libclang/CXIndexDataConsumer.h