[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 11 22:21:12 PDT 2025


================
@@ -950,6 +951,11 @@ struct CompletionRecorder : public CodeCompleteConsumer {
     // Retain the results we might want.
     for (unsigned I = 0; I < NumResults; ++I) {
       auto &Result = InResults[I];
+      if (Config::current().Completion.CodePatterns ==
+              Config::CodePatternsPolicy::None &&
+          Result.Kind == CodeCompletionResult::RK_Pattern &&
+          ContextKind != CodeCompletionContext::CCC_IncludedFile)
----------------
HighCommander4 wrote:

Please add a comment explaining that this carveout is for filename completions

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


More information about the cfe-commits mailing list