Skip to content

No -Wdeprecated-declarations at all on virtual calls #19797

@stbergmann

Description

@stbergmann
Bugzilla Link 19423
Version trunk
OS All
CC @DougGregor

Extended Description

As discussed in the mail thread http://clang-developers.42468.n3.nabble.com/No-Wdeprecated-declarations-at-all-on-virtual-calls-td4038378.html:

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 http://llvm.org/bugs/show_bug.cgi?id=4878 "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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillac++clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions