[LLVMbugs] [Bug 19423] New: No -Wdeprecated-declarations at all on virtual calls

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Apr 14 00:59:39 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=19423

            Bug ID: 19423
           Summary: No -Wdeprecated-declarations at all on virtual calls
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: stephan.bergmann.secondary at googlemail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140414/c1ef3496/attachment.html>


More information about the llvm-bugs mailing list