No -Wdeprecated-declarations at all on virtual calls?

The code

  bool ShouldCheckUse = true;
  if (CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(MemberDecl)) {
    // Don't diagnose the use of a virtual member function unless it's
    // explicitly qualified.
    if (MD->isVirtual() && !SS.isSet())
      ShouldCheckUse = false;

in lib/Sema/SemaExprMember.cpp, originally introduced with r81460 to fix <> "ability to call deprecated virtual methods in the same class without warning" prevents warnings on all virtual calls to such deprecated functions. Not just when the call is from the same class, but also when a client of that class calls the function.

Is that intentional? (I just had a case where it would have been useful to get the warning for the client-call case at least, and was surprised to not get a warning, esp. since GCC does give one.)


This looks like a bug to me, please file a PR!

OK, filed <> now.