[PATCH] Only use MSVC-compatible dependent base class hack for class template members.

Kim Gräsman kim.grasman at gmail.com
Tue Aug 12 08:26:44 PDT 2014

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() {

Does that even qualify as a dependent base lookup?



More information about the cfe-commits mailing list