[clang-tools-extra] [clangd] Make inline friend functions appear in document symbols (PR #150629)
kadir çetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 28 02:07:30 PDT 2025
================
@@ -391,6 +392,16 @@ class DocumentOutline {
D = TD;
}
+ // Friend declarations should be traversed if and only if
+ // they are also defined here.
----------------
kadircet wrote:
we aren't really visiting friend decl, we're visiting the underlying function definition.
can you also leave a comment mentioning why we special case this? (e.g. `FriendDecls don't act as `DeclContext`s but they might wrap a function definition that won't be visible through other means in the AST. Hence unwrap it here instead.`)
https://github.com/llvm/llvm-project/pull/150629
More information about the cfe-commits
mailing list