[PATCH] D151166: [clangd] Interactive AST matchers with #pragma clang query

2023-05-23 Thread Vlad Serebrennikov via Phabricator via cfe-commits
Endill added a comment. This is an interesting feature! There's a related `#pragma clang __debug dump`, that dumps name lookup result or a bit of AST for expression you pass to it (https://clang.llvm.org/docs/LanguageExtensions.html#debugging-the-compiler). I think clangd might be interested to

[PATCH] D151166: [clangd] Interactive AST matchers with #pragma clang query

2023-05-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. @kadircet this is a slightly silly feature that I put together on vacation I'd like your call on whether this is something we should have. If so, feel free to hand off the review. It's definitely a power-user feature and nigh undiscoverable. I'd plan to write some do

[PATCH] D151166: [clangd] Interactive AST matchers with #pragma clang query

2023-05-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 524519. sammccall edited the summary of this revision. sammccall added a comment. Add demo link Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151166/new/ https://reviews.llvm.org/D151166 Files: clang-tools

[PATCH] D151166: [clangd] Interactive AST matchers with #pragma clang query

2023-05-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. Herald added subscribers: kadircet, arphaman. Herald added a project: All. sammccall requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. The idea: you can type in AST matchers,