Fix diagnostic for static methods referencing fields from using decls
authorReid Kleckner <reid@kleckner.net>
Thu, 18 Dec 2014 00:42:51 +0000 (00:42 +0000)
committerReid Kleckner <reid@kleckner.net>
Thu, 18 Dec 2014 00:42:51 +0000 (00:42 +0000)
commitae628965c4afb428a927b78acf66f056c254e99b
treeaa0e69302e07871ac86e59574f8d8f4f0434ef29
parent323ddf97bad613d5c732412fd08965c48bed85f4
Fix diagnostic for static methods referencing fields from using decls

Previously we thought the instance member was a function, not a field,
and we'd say something silly like:
  t.cpp:4:27: error: call to non-static member function without an object argument
    static int f() { return n; }
                            ^

Noticed in PR21923.

llvm-svn: 224480
clang/lib/Sema/SemaExprMember.cpp
clang/test/SemaCXX/using-decl-1.cpp