[clangd] Add basic support for attributes (selection, hover)
authorSam McCall <sam.mccall@gmail.com>
Tue, 20 Oct 2020 10:01:48 +0000 (12:01 +0200)
committerSam McCall <sam.mccall@gmail.com>
Fri, 6 Aug 2021 20:49:14 +0000 (22:49 +0200)
commitbb81e7083d25bfc9bcf2bd69f5431d0c53b86a32
treebf2f6f9c74b385e97004bd98e5ab7a0d02d03c3c
parentc8f148274f42aa2ae8c18e1420fa28fefec05a53
[clangd] Add basic support for attributes (selection, hover)

These aren't terribly common, but we currently mishandle them badly.
Not only do we not recogize the attributes themselves, but we often end up
selecting some node other than the parent (because source ranges aren't accurate
in the presence of attributes).

Differential Revision: https://reviews.llvm.org/D89785
clang-tools-extra/clangd/AST.cpp
clang-tools-extra/clangd/AST.h
clang-tools-extra/clangd/Hover.cpp
clang-tools-extra/clangd/Selection.cpp
clang-tools-extra/clangd/XRefs.cpp
clang-tools-extra/clangd/unittests/ASTTests.cpp
clang-tools-extra/clangd/unittests/HoverTests.cpp
clang-tools-extra/clangd/unittests/SelectionTests.cpp