Bug 54259 - SVGStyledElement::fillAttributeToPropertyTypeMap triggers a clang warning (-Woverloaded-virtual)
Summary: SVGStyledElement::fillAttributeToPropertyTypeMap triggers a clang warning (-W...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Dirk Schulze
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-10 17:16 PST by Nico Weber
Modified: 2011-02-11 10:20 PST (History)
2 users (show)

See Also:


Attachments
Patch (49.86 KB, patch)
2011-02-11 00:16 PST, Dirk Schulze
kling: review+
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-10 17:16:30 PST
The patch in https://bugs.webkit.org/show_bug.cgi?id=53442 caused this clang warning:

In file included from out/Debug/obj/gen/webkit/bindings/V8DerivedSources3.cpp:90:
In file included from out/Debug/obj/gen/webcore/bindings/V8SVGCircleElement.cpp:22:
In file included from out/Debug/obj/gen/webkit/bindings/V8SVGCircleElement.h:26:
In file included from third_party/WebKit/Source/WebCore/svg/SVGCircleElement.h:29:
In file included from third_party/WebKit/Source/WebCore/svg/SVGStyledTransformableElement.h:26:
In file included from third_party/WebKit/Source/WebCore/svg/SVGStyledLocatableElement.h:26:
third_party/WebKit/Source/WebCore/svg/SVGStyledElement.h:71:10:error: 'WebCore::SVGStyledElement::fillAttributeToPropertyTypeMap' hides overloaded virtual function [-Woverloaded-virtual]
    void fillAttributeToPropertyTypeMap(AttributeToPropertyTypeMap&);
         ^
In file included from out/Debug/obj/gen/webkit/bindings/V8DerivedSources3.cpp:90:
In file included from out/Debug/obj/gen/webcore/bindings/V8SVGCircleElement.cpp:22:
In file included from out/Debug/obj/gen/webkit/bindings/V8SVGCircleElement.h:26:
In file included from third_party/WebKit/Source/WebCore/svg/SVGCircleElement.h:25:
In file included from third_party/WebKit/Source/WebCore/svg/SVGAnimatedBoolean.h:24:
In file included from third_party/WebKit/Source/WebCore/svg/properties/SVGAnimatedStaticPropertyTearOff.h:24:
In file included from third_party/WebKit/Source/WebCore/svg/properties/SVGAnimatedProperty.h:26:
third_party/WebKit/Source/WebCore/svg/SVGElement.h:93:18: note: hidden overloaded virtual function 'WebCore::SVGElement::fillAttributeToPropertyTypeMap' declared here
    virtual void fillAttributeToPropertyTypeMap() { }
                 ^
1 error generated.


I'm not sure if SVGStyledElement::fillAttributeToPropertyTypeMap is supposed to override SVGElement::fillAttributeToPropertyTypeMap…if not, I'd recommend renaming the method in the subclass. Having an overload of a virtual method of a base class is confusing at best.

This is currently the only place in webkit that triggers this warning.
Comment 1 Dirk Schulze 2011-02-11 00:16:24 PST
Created attachment 82110 [details]
Patch
Comment 2 Andreas Kling 2011-02-11 09:25:37 PST
Comment on attachment 82110 [details]
Patch

r=me
Comment 3 Dirk Schulze 2011-02-11 10:20:08 PST
Committed r78345: <http://trac.webkit.org/changeset/78345>