[PATCH] D19479: 26748 - clang-cl fails to compile atlctrlw.h header from WTL

Andrew V. Tischenko via cfe-commits cfe-commits at lists.llvm.org
Fri May 20 03:05:20 PDT 2016

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?


More information about the cfe-commits mailing list