You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[clangd] Code completion: drop explicit injected names/operators, ignore Sema priority
Summary:
Now we have most of Sema's code completion signals incorporated in Quality,
which will allow us to give consistent ranking to sema/index results.
Therefore we can/should stop using Sema priority as an explicit signal.
This fixes some issues like namespaces always having a terrible score.
The most important missing signals are:
- Really dumb/rarely useful completions like:
SomeStruct().^SomeStruct
SomeStruct().^operator=
SomeStruct().~SomeStruct()
We already filter out destructors, this patch adds injected names and
operators to that list.
- type matching the expression context.
Ilya has a plan to add this in a way that's compatible with indexes
(design doc should be shared real soon now!)
Reviewers: ioeric
Subscribers: ilya-biryukov, MaskRay, jkorous, cfe-commits
Differential Revision: https://reviews.llvm.org/D47871
llvm-svn: 334192
Copy file name to clipboardExpand all lines: clang-tools-extra/test/clangd/completion.test
+4-4
Original file line number
Diff line number
Diff line change
@@ -18,8 +18,8 @@
18
18
# CHECK-NEXT: "kind": 5,
19
19
# CHECK-NEXT: "label": "a",
20
20
# CHECK-NEXT: "sortText": "{{.*}}a"
21
-
# CHECK-NEXT: },
22
-
# CHECK: ]
21
+
# CHECK-NEXT: }
22
+
# CHECK-NEXT: ]
23
23
---
24
24
# Update the source file and check for completions again.
25
25
{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"test:///main.cpp","version":2},"contentChanges":[{"text":"struct S { int b; };\nint main() {\nS().\n}"}]}}
0 commit comments