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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to