-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[clang] Skip suggesting unqualified members in explicit-object member functions #153760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,7 +42,31 @@ int func3() { | |
|
|
||
| int func4() { | ||
| // TODO (&A::foo)( | ||
| (&A::bar)( | ||
| (&A::bar)() | ||
| } | ||
|
||
| // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-2):13 -std=c++23 %s | FileCheck -check-prefix=CHECK-CC5 %s | ||
| // CHECK-CC5: OVERLOAD: [#void#](<#A#>, int) | ||
|
|
||
| struct C { | ||
| int member {}; | ||
| int memberFnA(int a); | ||
| int memberFnA(this C&, float a); | ||
|
|
||
| void foo(this C& self) { | ||
| // Should not offer any members here, since | ||
| // it needs to be referenced through `self`. | ||
| mem | ||
| } | ||
| void bar(this C& self) { | ||
| // should offer all results | ||
| self.mem | ||
| } | ||
| }; | ||
| // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-7):8 -std=c++23 %s | FileCheck --allow-empty %s | ||
| // CHECK-NOT: COMPLETION: member : [#int#]member | ||
| // CHECK-NOT: COMPLETION: memberFnA : [#int#]memberFnA(<#int a#>) | ||
| // CHECK-NOT: COMPLETION: memberFnA : [#int#]memberFnA(<#float a#>) | ||
| // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:%(line-7):13 -std=c++23 %s | FileCheck -check-prefix=CHECK-CC6 %s | ||
| // CHECK-CC6: COMPLETION: member : [#int#]member | ||
| // CHECK-CC6: COMPLETION: memberFnA : [#int#]memberFnA(<#int a#>) | ||
| // CHECK-CC6: COMPLETION: memberFnA : [#int#]memberFnA(<#float a#>) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to rename this, wasn't sure of a good name, especially since filters use the
IsXxxformat.