[clang] [clang-tools-extra] [clangd] Autocomplete fixes for methods (PR #165916)
Nathan Ridge via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 28 00:29:14 PST 2025
HighCommander4 wrote:
Note also there is a flag on `CodeCompletionResult` called [`DeclaringEntity`](https://searchfox.org/llvm/rev/2c13075b2956819dc5a562f14a48d027537cf2e5/clang/include/clang/Sema/CodeCompleteConsumer.h#858-860), which currently seems to only be set in some Objective-C codepaths.
We can start setting this flag when completing a definition, as a means of communicating that boolean to consumers such as clangd. This way, if desired, clangd can also have dedicated behaviour when completing a definition. (But logic that's appropriate for all consumers such as not creating placeholders for arguments, is best placed in SemaCodeComplete rather than clangd.)
https://github.com/llvm/llvm-project/pull/165916
More information about the cfe-commits
mailing list