Recursive AST requires non-const ast nodes, but it doesn't really
mutate them. In addition to that, in clangd we mostly have const ast nodes. So
it makes sense to move the const_cast into callee rather than having it at every
caller in the future.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Who are the callers? Selection tree?
FWIW, I'd rather pass non-const everywhere, the concept of const-ness is just not very useful for AST nodes.
Comment Actions
@kadircet says we're using this pattern all over clangd. This somehow slipped my view before.
LGTM to be consistent with the rest of clangd (and functions in FindTarget.h).
I think we should switch to passing non-const pointers everywhere, but that's a discussion for another day...