[clang-tools-extra] [clangd] Add CodePatterns config option under Completion (PR #137613)
Nathan Ridge via cfe-commits
cfe-commits at lists.llvm.org
Sun May 4 23:57:12 PDT 2025
HighCommander4 wrote:
> There is 2 different features involved here.
>
> [...]
>
> In the feature i'm trying to implement, number 1 should be OFF if CodePatterns is set to None but number 2 should still be working.
That makes sense to me, as a user expectation.
The code I linked to in my previous comment is for (1). The completions for scenario (2) come from [here](https://searchfox.org/llvm/rev/1b60b83adad8c62140ce8cc092179ed06df7ff09/clang/lib/Sema/SemaCodeComplete.cpp#10355), but unfortunately that's also `RK_Pattern`.
> Are these 2 features (num 1 & 2) coupled or can they be managed separately as the current state ?
It looks like we can achieve this by allowing `RK_Pattern` completions if `Context.getKind() == CodeCompletionContext::CCC_IncludedFile`.
https://github.com/llvm/llvm-project/pull/137613
More information about the cfe-commits
mailing list