[clangd] Support hover on __func__ etc (PredefinedExpr)
authorSam McCall <sam.mccall@gmail.com>
Fri, 19 Aug 2022 12:51:36 +0000 (14:51 +0200)
committerSam McCall <sam.mccall@gmail.com>
Fri, 19 Aug 2022 12:51:46 +0000 (14:51 +0200)
commit13b2a0c69ba69c1317308b6e5a8279160561c4b2
treee688016463c56399334b91b8b331013a05b0791b
parent3d2ea3c77f8a670ee84c2500f3525a512e43c4f6
[clangd] Support hover on __func__ etc (PredefinedExpr)

Expose these as variables as that's what the standard calls them (and D131175).

To make this work, we also fix a bug in SelectionTree: PredefinedExpr has
an implicit/invisible StringLiteral, and SelectionTree should not traverse
implicit things.

Reviewed By: ckandeler

Differential Revision: https://reviews.llvm.org/D132135
clang-tools-extra/clangd/Hover.cpp
clang-tools-extra/clangd/Selection.cpp
clang-tools-extra/clangd/unittests/HoverTests.cpp
clang-tools-extra/clangd/unittests/SelectionTests.cpp