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

2015-10-16 Thread Reid Kleckner via cfe-commits
This revision was automatically updated to reflect the committed changes. rnk marked an inline comment as done. Closed by commit rL250592: Diagnose UnresolvedLookupExprs that resolve to instance members in static… (authored by rnk). Changed prior to commit:

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

2015-10-13 Thread Reid Kleckner via cfe-commits
rnk added inline comments. Comment at: lib/Sema/TreeTransform.h:9138 @@ +9137,3 @@ + isa(D)) +return getSema().BuildPossibleImplicitMemberExpr( +SS, SourceLocation(), R, /*TemplateArgs=*/nullptr, I believe this will always fail, so

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

2015-10-13 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/TreeTransform.h:9135 @@ +9134,3 @@ +if (NamedDecl *D = R.getAsSingle()) { + D = D->getUnderlyingDecl(); + if (isa(D) || isa(D) || getAsSingle already looks through to the underlying decl.

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

2015-10-13 Thread John McCall via cfe-commits
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

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

2015-10-13 Thread Reid Kleckner via cfe-commits
rnk updated this revision to Diff 37303. rnk added a comment. - Remove duplicate tests, beef them up http://reviews.llvm.org/D6700 Files: include/clang/Sema/Sema.h lib/Sema/SemaExprMember.cpp lib/Sema/TreeTransform.h test/SemaCXX/using-decl-1.cpp

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

2015-10-13 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. LGTM Comment at: lib/Sema/TreeTransform.h:9131 @@ -9130,2 +9130,3 @@ // it's a normal declaration name. - if (!Old->hasExplicitTemplateArgs() && !TemplateKWLoc.isValid())