[PATCH] D147782: [clang] Fix 'operator=' lookup in nested class

2023-04-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Ah, I see. In D147782#4251185 , @J-Camilleri wrote: > 2. Have the `IdResolver` declarations ordered by scope, going from most > nested to least nested. This is the intended behavior. But `Sema::PushOnScopeChains` doesn't correc

[PATCH] D147782: [clang] Fix 'operator=' lookup in nested class

2023-04-07 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. What *should* happen here is that the lookup for `operator=` in `Inner::invokeAssign` should walk up the enclosing `Scope`s and `DeclContext`s, traversing both the results from the `IdResolver` and the results from `DeclContext` lookups. First, we should look in the scop

[PATCH] D147782: [clang] Fix 'operator=' lookup in nested class

2023-04-07 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/Sema/SemaLookup.cpp:1328 // namespace scope - SearchNamespaceScope = false; + SearchNamespaceScope = Name.getCXXOverloadedOperator() == OO_Equal; } Maybe we should also add

[PATCH] D147782: [clang] Fix 'operator=' lookup in nested class

2023-04-07 Thread Jonathan Camilleri via Phabricator via cfe-commits
J-Camilleri added a reviewer: aaron.ballman. J-Camilleri added a comment. Firstly, If there are other reviewers which I should include instead please let me know, the developers that changed around this area did so a long time ago and I do not know who to add. I have described the problem in th

[PATCH] D147782: [clang] Fix 'operator=' lookup in nested class

2023-04-07 Thread Jonathan Camilleri via Phabricator via cfe-commits
J-Camilleri created this revision. Herald added a project: All. J-Camilleri requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. If implicitly declared 'operator=' declarations are generated before encountering a use in a nested class, custom de