kadircet wrote:

> My main motivation is to get DefineOutline

I think if we're solely aiming for improvements to DefineOutline, I'd say the 
resource trade-off here isn't worth it.

> I don't see how bracket matching can help us get from the name of the 
> function to the actual start of the declaration.

so let's say we've got the location for `foo::bar` from the index, as the 
declaration to insert after:
```cpp
...
void foo::^bar() {}
...
```

WDYT about an approach that just looks for first trailing `{}` (at the same 
level of indentation, i.e. ignoring anything in the function prototype) ? this 
might surely have false positives in cases with returning auto-types/concepts 
etc. but I think it's still a big enough increment without incurring any costs.

https://github.com/llvm/llvm-project/pull/118102
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to