[cfe-dev] Using declarations for static member functions

Daniel Jasper djasper at google.com
Fri Jan 4 01:28:08 PST 2013


In:

class A {
 protected:
  static void f() {}
};

class B : public A {
 public:
  using A::f;
};

void f() {
  B::f();
}

The B::f() call creates a DeclRefExpr where the FoundDecl is the
CXXMethodDecl A::f(). This is contrary to cases of non-static member
functions (where the MemberExpr has a FoundDecl that is a UsingShadowDecl)
and non-member functions in general (where the FoundDecl of the DeclRefExpr
is a UsingShadowDecl).

Is this a bug? Does anyone know of hand how to fix it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130104/fb33fe90/attachment.html>


More information about the cfe-dev mailing list