File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
clang/test/CodeCompletion Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,23 @@ int func3() {
4242
4343int func4 () {
4444 // TODO (&A::foo)(
45- (&A::bar)(
45+ (&A::bar)()
4646}
4747// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-2):13 -std=c++23 %s | FileCheck -check-prefix=CHECK-CC5 %s
4848// CHECK-CC5: OVERLOAD: [#void#](<#A#>, int)
49+
50+ struct C {
51+ int member {};
52+ void foo (this C& self) {
53+ // Should not offer `member` here, since it needs to be
54+ // referenced as `self.member`.
55+ mem
56+ }
57+ void bar (this C& self) {
58+ self.mem
59+ }
60+ };
61+ // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-8):8 -std=c++23 %s | FileCheck --allow-empty %s
62+ // CHECK-NOT: COMPLETION: member : [#int#]member
63+ // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-5):13 -std=c++23 %s | FileCheck -check-prefix=CHECK-CC6 %s
64+ // CHECK-CC6: COMPLETION: member : [#int#]member
You can’t perform that action at this time.
0 commit comments