Bug 54924 - ImageDocument::imageChanged() confuses clang's -Woverride-virtual
Summary: ImageDocument::imageChanged() confuses clang's -Woverride-virtual
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 54367
  Show dependency treegraph
 
Reported: 2011-02-21 18:53 PST by Nico Weber
Modified: 2011-02-21 22:10 PST (History)
2 users (show)

See Also:


Attachments
Patch (2.45 KB, patch)
2011-02-21 19:04 PST, Nico Weber
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Weber 2011-02-21 18:53:07 PST
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.
Comment 1 Nico Weber 2011-02-21 19:04:34 PST
Created attachment 83256 [details]
Patch
Comment 2 WebKit Commit Bot 2011-02-21 22:10:44 PST
Comment on attachment 83256 [details]
Patch

Clearing flags on attachment: 83256

Committed r79288: <http://trac.webkit.org/changeset/79288>
Comment 3 WebKit Commit Bot 2011-02-21 22:10:49 PST
All reviewed patches have been landed.  Closing bug.