[clang-tools-extra] [clangd] Allow "move function body out-of-line" in non-header files (PR #69704)

kadir çetinkaya via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 17 04:56:32 PST 2023


kadircet wrote:

Yes, the current logic that finds insertion point wont work in presence of anon namespaces.

We normally do some pseudo parsing to find a location to insert the definiton, but because these are happening inside the main-file now, you can directly make use of sourcelocations inside the AST to determine an insertion point.

The other part is spelling of the function name and return type, there's a good chance they'll also do a weird thing when used for entities inside anon namespaces.

https://github.com/llvm/llvm-project/pull/69704


More information about the cfe-commits mailing list