[PATCH] D130363: [clang] Give priority to Class context while parsing declarations

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 1 01:55:37 PDT 2022


kadircet added a comment.

> Is my invocation correct or is this case handled by clangd and not clang?

yeah your invocation is correct. this is because clang's printer does a prefix based filtering (while clangd does a fuzzy match) https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/CodeCompleteConsumer.cpp#L623.



================
Comment at: clang/test/CodeCompletion/overrides.cpp:41
+// Runs completion at empty line on line 13.
+// RUN: %clang_cc1 -fsyntax-only -code-completion-patterns -code-completion-at=%s:13:1 %s -o - | FileCheck -check-prefix=CHECK-CC4 %s
+// CHECK-CC4: COMPLETION: Pattern : void vfunc(bool param) override{{$}}
----------------
no need for `-code-completion-patterns`. can you also move the new test case below (after `CHECK-CC3-NOT`) that way we get to keep the line numbers for old tests the same.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130363/new/

https://reviews.llvm.org/D130363



More information about the cfe-commits mailing list