[clang-tools-extra] [clangd] Let DefineOutline tweak handle member function templates (PR #112345)
kadir çetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 18 00:56:19 PDT 2024
kadircet wrote:
i remember mainly two concerns;
- we didn't want to surprise developers by breaking their builds as template definitions needs to be visible at instantiation sites. so if we keep the definition in the same file, just move it out-of-line, this should be fine.
- i remember AST was lacking information about template parameter names, maybe that's resolved now. This was causing issues as you need to print the whole outer template parameter list as-is, e.g. in the tests behavior looks like:
```cpp
template <typename U>
inline void Foo<T>::bar(const T& t, const U& u) {}
```
this won't compile as `T` isn't defined. you also need to print `template <typename T>` on top (and keep doing for rest of the outer decls).
if we can address both of these, i don't think there's any other reason to not have them
https://github.com/llvm/llvm-project/pull/112345
More information about the cfe-commits
mailing list