[PATCH] D148423: [clangd] Support define outline tweak for non cross file edits
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 15 03:15:32 PDT 2023
njames93 added a comment.
Theres definitely scope to improve this in follow ups.
We could support this for template methods and classes
template <typename T> struct A {
void [[Foo]]() {}
template<typename U> void [[Bar]]() {}
};
// Both ranges transformed to
template <typename T> struct A {
void Foo();
template<typename U> void Bar();
};
template <typename T>
void A<T>::Foo() {}
template <typename T>
template <typename U>
void A<T>::Bar<U>() {}
In D147808 <https://reviews.llvm.org/D147808> The restriction only only applying the tweak for non trivial member functions could be removed when making a non cross file edit.
We could also employ a better insertion point logic for these tweaks as we have the full AST for the file where the function is to be inserted.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148423/new/
https://reviews.llvm.org/D148423
More information about the cfe-commits
mailing list