[PATCH] D116502: [clangd] Helper for determining member insertion point.

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 3 00:55:15 PST 2022


kadircet added a comment.

We have some logic in AddUsing tweak to determine insertion point based on AST. i think it makes sense to migrate it to these helpers too. There's some more logic in extract variable/function too. Extract variable seems too elaborate as it actually looks at statements, rather than decls and extract function is quite simple already as we already figure out current function's range and whatnot, but having another usage might help.

(thinking out loud)
We've got some helpers in SourceCode.h to determine insertion point in the absence of ASTs. Concepts here and there around an "insertion point" seems to be quite different (it's just a sourcelocation here and a set of locations + a namespace in SourceCode.h).
I suppose those two are somewhat hard to merge and serve different purposes, so It's better to keep them separate.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116502/new/

https://reviews.llvm.org/D116502



More information about the cfe-commits mailing list