mattd added a comment. Thanks for the comments Eli! I agree, it makes sense to flag certain expressions to be type dependent at the earliest time of compilation. Clang already does this, as the Value/Type dependence is established upon Expr construction from MemberExpr construction.
As we have discussed, in the case of MemberExpr, Clang bases dependence on the 'this' pointer, which can be seen in the MemberExpr constructor. And from the attached test case, this is decision is not correct. From what we noted, member access expressions can base their dependence on the type of the member. However, after trying to propagate this change sooner rather than later (in the MemberExpr ctor), I realized that I might have been changing language semantics. One thing, in particular, is how we handle address-of expressions. Clang predicates them, internally, on type-dependence. From that perspective, we will never try to bind a address-of expression within a template definition, if the address-of is for a member variable. The bind will only occur during template instantiation. Another case we have to be aware of are MemberExpr where the member is a CXXMethodExpr, which would be dependent given the implicit 'this' parameter; that's correct, but I don't want to break that either. https://reviews.llvm.org/D40566 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits