rnk added a comment.
Richard suggested that maybe we formed the wrong AST while parsing the
template. I'm not sure that's the case. We have this very explicit logic that
controls what AST nodes we form in SemaExprMember.cpp
ClassifyImplicitMemberAccess:
bool isStaticContext = SemaRef.CXXThisTypeOverride.isNull() &&
(!isa<CXXMethodDecl>(DC) || cast<CXXMethodDecl>(DC)->isStatic());
if (R.isUnresolvableResult())
return isStaticContext ? IMA_Unresolved_StaticContext : IMA_Unresolved;
John wrote this code in r90266. The behavior seems pretty intentional, so think
we're forming the right AST for the template. Our AST just anticipates that
it's going to be instantiated with a base class where the member in question is
static.
I think we just need some extra diagnostics during instantiation, which this
change implements as-is. What do you think? I'll reupload without the other
changes.
http://reviews.llvm.org/D6700
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits