[PATCH] D6700: Diagnose UnresolvedLookupExprs that resolve to instance members in static methods

John McCall via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 13 14:44:12 PDT 2015


rjmccall added a comment.

As a more general comment, I believe the rule is that we try to always make a MemberExpr/UnresolvedMemberExpr whenever there *might* be a base, but that the resulting distinction between an implicit-base UnresolvedMemberExpr and an UnresolvedLookupExpr is not actually used for anything in Sema.  When I wrote this code originally, I wanted to make sure we made the "right" decision early to leave plenty of room to handle language requirements that drove a stronger wedge between them, and that's probably still a good idea; but I'm pretty sure it's true that those requirements don't exist right now.  It does give you an invariant that you only see implicit-base MemberExprs and UnresolvedMemberExprs in contexts that actually have a 'this'.


http://reviews.llvm.org/D6700





More information about the cfe-commits mailing list