[Webkit-unassigned] [Bug 54924] New: ImageDocument::imageChanged() confuses clang's -Woverride-virtual

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 21 18:53:07 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=54924

           Summary: ImageDocument::imageChanged() confuses clang's
                    -Woverride-virtual
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: thakis at chromium.org


ImageDocument has a method called imageChanged(). It indirectly inherits from CachedResourceClient, which has a method of the same name. From what I can tell, the method in ImageDocument is not supposed to override the superclass's method. clang's -Woverride-virtual complains:

third_party/WebKit/Source/WebCore/html/ImageDocument.h:46:10:error: 'WebCore::ImageDocument::imageChanged' hides overloaded virtual function [-Woverloaded-virtual]
    void imageChanged();
         ^
In file included from third_party/WebKit/Source/WebCore/html/ImageDocument.cpp:26:
In file included from third_party/WebKit/Source/WebCore/html/ImageDocument.h:28:
In file included from third_party/WebKit/Source/WebCore/html/HTMLDocument.h:26:
third_party/WebKit/Source/WebCore/loader/cache/CachedResourceClient.h:55:22: note: hidden overloaded virtual function 'WebCore::CachedResourceClient::imageChanged' declared here
        virtual void imageChanged(CachedImage*, const IntRect* = 0) { };
                     ^

One of the two methods should be renamed.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list