[clangd] Allow AST request without range
authorChristian Kandeler <christian.kandeler@qt.io>
Fri, 23 Apr 2021 19:17:43 +0000 (21:17 +0200)
committerSam McCall <sam.mccall@gmail.com>
Fri, 23 Apr 2021 19:35:42 +0000 (21:35 +0200)
commit81dae18dff7fe8c2783c7b73e5c08167d6c60b47
tree5e39f4e8096c7168cc535ceebde1db7bf91b2370
parent9aee07abd0cacc960bb06870ce3eedd20545b28b
[clangd] Allow AST request without range

If no range is given, return the translation unit AST.
This is useful for tooling operations that require e.g. the full path to
a node.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D101057
clang-tools-extra/clangd/ClangdServer.cpp
clang-tools-extra/clangd/ClangdServer.h
clang-tools-extra/clangd/DumpAST.cpp
clang-tools-extra/clangd/DumpAST.h
clang-tools-extra/clangd/Protocol.h
clang-tools-extra/clangd/test/ast-no-range.test [new file with mode: 0644]
clang-tools-extra/clangd/unittests/DumpASTTests.cpp