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)
commitea4d2590417baba3c6d5cad7043f8594faf2ac68
tree57535a3521dd525a7dc0cf17469bd8f48eabb3ae
parent7857415785c2518eb75e782312198c7c71416a12
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.

llvm-svn: 166154
clang/lib/Sema/SemaDeclCXX.cpp
clang/test/SemaCXX/warn-overloaded-virtual.cpp