I've played with another approach, to just ask the DeclContext if its parent is 
a record, i.e.

  if (DC->isDependentContext() && DC->isFunctionOrMethod() && 
DC->getParent()->isRecord()) {
     // ...
  }

and it seems to work equally well for the test cases I've provided.

I'm not sure if checking for records is sufficient, though, I'm worried about 
constructs like:

  struct Foo {
    template<class T>
    void bar() {
       UndefType::staticMethod();
    }
  };

Does that even qualify as a dependent base lookup?

Thanks,
Kim

http://reviews.llvm.org/D4854



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to