avt77 added a comment.

It seems I gave up with this issue :-( We have 2 possible situations here:

1. A type from instantiated type used inside the template (like in the test I'm 
working on)
2. A feature from instantiated type used inside the template (like below)

struct A {

  int bar ();

}
template <class T> struct B : public T {

  int foo () {return bar();}

....
}
void test (){

  B<A> b;
  int c = b.foo();

}
We can't made any assumption about the unknown identificator: is it type or a 
feature? In the first case we should deal with ParsedType but in the second 
case we should deal with DependentScopeDeclRefExpr. Of course we could create 
something like TypeOrExpr but I'm not sure it's an acceptable solution. The 
best way here is real implementation of late parsing for all in-class defined 
features from templates: this parsing should be done at instantiation point 
only (when we can discover all involved entities.).

What do you think about? Could you give me a hint how to resolve the issue 
without really late parsing?


http://reviews.llvm.org/D19479



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to