]> granicus.if.org Git - clang/commit
Fix -Woverloaded-virtual when the using statement refers to a base declaration of...
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 17 Oct 2012 23:45:39 +0000 (23:45 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 17 Oct 2012 23:45:39 +0000 (23:45 +0000)
commit76398e5ad39ae719dcc650c7cddeb25379c02c34
tree28c8ba0f843881cdc3d1be9691d6f2f19890ce31
parentd654f2d722d4cb6366edcb8f27e99745fcbae486
Fix -Woverloaded-virtual when the using statement refers to a base declaration of a virtual function.

GCC and Clang both do not warn on:

  struct a { virtual void func(); };
  struct b: a { virtual void func(); void func(int); };
  struct c: b { void func(int); using b::func; };

but if the "using" was using a::func GCC would still remain silent where Clang
would warn. This change makes Clang consistent with GCC's existing behavior.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166154 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDeclCXX.cpp
test/SemaCXX/warn-overloaded-virtual.cpp