[PATCH] D138091: [Clang] Fix Sema::ClassifyName so that it classifies EnumConstantDecl as NonType when they are brought into scope via using enum
Shafik Yaghmour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 16 12:03:33 PST 2022
shafik added a comment.
In D138091#3930356 <https://reviews.llvm.org/D138091#3930356>, @urnathan wrote:
> Thanks, I didn;'t know about ClassifyName, and obviously never hit a need to adjust it. Thanks for fixing.
>
> The comment above says we don't resolve member-access non-overload sets in order to check access. Do we still get that right for, say,
>
> class B {
> enum A {E};
> static auto F (B *p) { return p->E;} // ok
> };
> auto F (B *p) { return p->E; } // not ok
>
> If so, I guess that comment's not right (any more).
It says `we need to defer certain access checks until we know the context` as well.
I checked and with this change it gets this case right. So no behavior change there and I ran `check-clang` as well and that was clean.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138091/new/
https://reviews.llvm.org/D138091
More information about the cfe-commits
mailing list