Bug 100618 - HTMLPropertiesCollection.h:52:42: error: 'namedItem' marked 'override' but does not override any member functions
Summary: HTMLPropertiesCollection.h:52:42: error: 'namedItem' marked 'override' but do...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-28 14:32 PDT by Jeremy Huddleston Sequoia
Modified: 2013-02-11 00:35 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Huddleston Sequoia 2012-10-28 14:32:12 PDT
The c++11-narrowing issues are being handled by #100617.  This issue is about WebKitDOMHTMLElement.cpp failing to compile using clang++ because:

./Source/WebCore/html/HTMLPropertiesCollection.h:52:42: error: 'namedItem' marked 'override' but does not override any member functions
    virtual PassRefPtr<PropertyNodeList> namedItem(const String&) const OVERRIDE;

This happens with -std=c++11 or without it, although I decided to use -std=c++11 because WebKit seems to be using C++11 extensions and not using -std=c++11 results in a deluge of -Wc++11-extensions warnings =)


/bin/sh ./libtool  --tag=CXX   --mode=compile /usr/bin/clang++ -DHAVE_CONFIG_H -I.  -DBUILDING_WEBKIT -DPACKAGE_LOCALE_DIR=\"/opt/local/share/locale\" -DDATA_DIR=\"/opt/local/share\" -I./Source/WebCore/bindings -I./Source/WebCore/bindings/gobject -I./Source/WebKit/gtk -I./Source/WebKit/gtk/WebCoreSupport -I./Source/WebKit/gtk/webkit -I./DerivedSources/webkit -ISource/WebKit/gtk/webkit -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -Wno-parentheses -fno-exceptions -DENABLE_GLIB_SUPPORT=1 -DBUILDING_CAIRO__=1 -DBUILDING_GTK__=1 -DBUILDING_SOUP__=1 -DWTF_CHANGES   -DXP_UNIX -DMOZ_X11  -DWTF_USE_ICU_UNICODE=1   -DWTF_USE_GSTREAMER=1  -DWTF_USE_ACCELERATED_COMPOSITING=1 -DENABLE_3D_RENDERING=1  -DWTF_USE_TEXTURE_MAPPER=1 -DWTF_USE_TEXTURE_MAPPER_GL=1  -DWTF_USE_GLX=1 -DWTF_USE_OPENGL=1 -DGTK_API_VERSION_2=1 -DNDEBUG   -I./Source/ThirdParty/ANGLE/src -I./Source/ThirdParty/ANGLE/include -I./Source/ThirdParty/ANGLE/include/GLSLANG -I./Source/WebCore -I./Source/WebCore/Modules/filesystem -I./Source/WebCore/Modules/gamepad -I./Source/WebCore/Modules/geolocation -I./Source/WebCore/Modules/indexeddb -I./Source/WebCore/Modules/mediasource -I./Source/WebCore/Modules/mediastream -I./Source/WebCore/Modules/notifications -I./Source/WebCore/Modules/protocolhandler -I./Source/WebCore/Modules/quota -I./Source/WebCore/Modules/webaudio -I./Source/WebCore/Modules/webdatabase -I./Source/WebCore/Modules/websockets -I./Source/WebCore/accessibility -I./Source/WebCore/bindings -I./Source/WebCore/bindings/generic -I./Source/WebCore/bindings/js -I./Source/WebCore/bridge -I./Source/WebCore/bridge/c -I./Source/WebCore/bridge/jni/jsc -I./Source/WebCore/bridge/jsc -I./Source/WebCore/css -I./Source/WebCore/dom -I./Source/WebCore/dom/default -I./Source/WebCore/editing -I./Source/WebCore/fileapi -I./Source/WebCore/history -I./Source/WebCore/html -I./Source/WebCore/html/canvas -I./Source/WebCore/html/parser -I./Source/WebCore/html/shadow -I./Source/WebCore/html/track -I./Source/WebCore/inspector -I./Source/WebCore/loader -I./Source/WebCore/loader/appcache -I./Source/WebCore/loader/archive -I./Source/WebCore/loader/cache -I./Source/WebCore/loader/icon -I./Source/WebCore/mathml -I./Source/WebCore/page -I./Source/WebCore/page/animation -I./Source/WebCore/page/scrolling -I./Source/WebCore/platform -I./Source/WebCore/platform/animation -I./Source/WebCore/platform/audio -I./Source/WebCore/platform/graphics -I./Source/WebCore/platform/graphics/filters -I./Source/WebCore/platform/graphics/filters/arm -I./Source/WebCore/platform/graphics/gpu -I./Source/WebCore/platform/graphics/opengl -I./Source/WebCore/platform/graphics/opentype -I./Source/WebCore/platform/graphics/transforms -I./Source/WebCore/platform/image-decoders -I./Source/WebCore/platform/image-decoders/bmp -I./Source/WebCore/platform/image-decoders/gif -I./Source/WebCore/platform/image-decoders/ico -I./Source/WebCore/platform/image-decoders/jpeg -I./Source/WebCore/platform/image-decoders/webp -I./Source/WebCore/platform/image-decoders/png -I./Source/WebCore/platform/leveldb -I./Source/WebCore/platform/linux -I./Source/WebCore/platform/mediastream -I./Source/WebCore/platform/mediastream/gstreamer -I./Source/WebCore/platform/mock -I./Source/WebCore/platform/network -I./Source/WebCore/platform/sql -I./Source/WebCore/platform/text -I./Source/WebCore/platform/text/transcoder -I./Source/WebCore/platform/win -I./Source/WebCore/plugins -I./Source/WebCore/plugins/win -I./Source/WebCore/rendering -I./Source/WebCore/rendering/mathml -I./Source/WebCore/rendering/style -I./Source/WebCore/rendering/svg -I./Source/WebCore/storage -I./Source/WebCore/svg -I./Source/WebCore/svg/animation -I./Source/WebCore/svg/graphics -I./Source/WebCore/svg/graphics/filters -I./Source/WebCore/svg/properties -I./Source/WebCore/testing -I./Source/WebCore/testing/js -I./Source/WebCore/websockets -I./Source/WebCore/workers -I./Source/WebCore/xml -I./Source/WebCore/xml/parser -I./WebCore/bindings/js -I./DerivedSources/WebCore -I./DerivedSources -I./DerivedSources/JavaScriptCore -DDATA_DIR=\"/opt/local/share\" -DENABLE_SMOOTH_SCROLLING=1 -DENABLE_CHANNEL_MESSAGING=1   -DENABLE_METER_ELEMENT=1 -DENABLE_PROGRESS_ELEMENT=1 -DENABLE_JAVASCRIPT_DEBUGGER=1   -DENABLE_GAMEPAD=0 -DENABLE_SQL_DATABASE=1  -DENABLE_DATALIST_ELEMENT=1      -DENABLE_DIRECTORY_UPLOAD=0 -DENABLE_MUTATION_OBSERVERS=1    -DENABLE_TOUCH_ICON_LOADING=0  -DENABLE_INPUT_TYPE_COLOR=0  -DENABLE_INPUT_SPEECH=0  -DENABLE_SCRIPTED_SPEECH=0 -DENABLE_ICONDATABASE=1   -DENABLE_VIDEO=1   -DENABLE_MEDIA_SOURCE=0 -DENABLE_MEDIA_STATISTICS=1  -DENABLE_FULLSCREEN_API=1 -DENABLE_VIDEO_TRACK=1   -DENABLE_MEDIA_STREAM=0 -DENABLE_XSLT=1 -DENABLE_WORKERS=1 -DENABLE_SHADOW_DOM=1 -DENABLE_SHARED_WORKERS=1 -DENABLE_FILTERS=1 -DENABLE_CSS_BOX_DECORATION_BREAK=1 -DENABLE_CSS_REGIONS=1   -DENABLE_CSS_EXCLUSIONS=1 -DENABLE_GEOLOCATION=1 -DENABLE_MATHML=1  -DENABLE_SVG=1 -DENABLE_SVG_FONTS=1   -DENABLE_WEB_SOCKETS=1  -DENABLE_BLOB=1 -DENABLE_LEGACY_WEBKIT_BLOB_BUILDER=1  -DENABLE_REQUEST_ANIMATION_FRAME=1 -DENABLE_WEBGL=1  -I./Source/WebCore/platform/graphics/texmap  -DENABLE_MHTML=1 -I./Source/WebCore/loader/archive/mhtml -DENABLE_MICRODATA=1    -DENABLE_WEB_TIMING=1 -DENABLE_IFRAME_SEAMLESS=1   -DENABLE_LINK_PREFETCH=1  -DENABLE_SPELLCHECK=1 -DWEBKITGTK_API_VERSION_STRING=\"1.0\" -DWTF_USE_SOUP=1 -I./Source/WebCore/accessibility/gtk -I./Source/WebCore/loader/gtk -I./Source/WebCore/page/gtk -I./Source/WebCore/platform/cairo -I./Source/WebCore/platform/audio/gstreamer -I./Source/WebCore/platform/geoclue -I./Source/WebCore/platform/graphics/cairo -I./Source/WebCore/platform/graphics/glx -I./Source/WebCore/platform/graphics/gstreamer -I./Source/WebCore/platform/graphics/gtk -I./Source/WebCore/platform/gtk -I./Source/WebCore/platform/network/soup -I./Source/WebCore/platform/text/gtk  -DWTF_USE_PANGO=1 -I./Source/WebCore/platform/graphics/pango  -DENABLE_JIT=0 -I./Source -I./Source/JavaScriptCore -I./Source/JavaScriptCore/API -I./Source/JavaScriptCore/assembler -I./Source/JavaScriptCore/bytecode -I./Source/JavaScriptCore/bytecompiler -I./Source/JavaScriptCore/dfg -I./Source/JavaScriptCore/disassembler -I./Source/JavaScriptCore/heap -I./Source/JavaScriptCore/debugger -I./Source/JavaScriptCore/ForwardingHeaders -I./Source/JavaScriptCore/interpreter -I./Source/JavaScriptCore/jit -I./Source/JavaScriptCore/jit -I./Source/JavaScriptCore/llint -I./Source/JavaScriptCore/parser -I./Source/JavaScriptCore/profiler -I./Source/JavaScriptCore/runtime -I./Source/JavaScriptCore/tools -I./Source/JavaScriptCore/yarr -I./DerivedSources/JavaScriptCore -I./Source/WTF -DENABLE_SPELLCHECK=1 -fno-strict-aliasing    -D_REENTRANT -I/opt/local/include/enchant -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include   -D_REENTRANT -I/opt/local/include/gail-1.0 -I/opt/local/include/atk-1.0 -I/opt/local/include/gtk-2.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/cairo -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/pango-1.0 -I/opt/local/include/gio-unix-2.0/ -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng15   -I/opt/local/include -I/opt/local/include/dbus-1.0 -I/opt/local/include/libxml2 -I/opt/local/lib/dbus-1.0/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include   -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include   -D_REENTRANT -I/opt/local/include/gstreamer-0.10 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/libxml2   -D_REENTRANT -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/pango-1.0 -I/opt/local/include/gio-unix-2.0/ -I/opt/local/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng15   -D_REENTRANT -I/opt/local/include/libsoup-2.4 -I/opt/local/include/libxml2 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include   -I/opt/local/include/libxml2   -I/opt/local/include -I/opt/local/include/libxml2   -I/opt/local/include   -I/opt/local/include  -L/opt/local/lib -lXcomposite   -L/opt/local/lib -lXdamage -lXfixes   -I/opt/local/include   -I/opt/local/include    -fvisibility-inlines-hidden -fno-rtti -pipe -O2 -std=c++11 -Wno-error=c++11-narrowing -arch x86_64 -O2 -MT DerivedSources/webkit/libwebkitgtk_1_0_la-WebKitDOMHTMLElement.lo -MD -MP -MF DerivedSources/webkit/.deps/libwebkitgtk_1_0_la-WebKitDOMHTMLElement.Tpo -c -o DerivedSources/webkit/libwebkitgtk_1_0_la-WebKitDOMHTMLElement.lo `test -f 'DerivedSources/webkit/WebKitDOMHTMLElement.cpp' || echo './'`DerivedSources/webkit/WebKitDOMHTMLElement.cpp
clang: warning: -lXcomposite: 'linker' input unused
clang: warning: -lXdamage: 'linker' input unused
clang: warning: -lXfixes: 'linker' input unused
clang: warning: argument unused during compilation: '-L/opt/local/lib'
clang: warning: argument unused during compilation: '-L/opt/local/lib'
In file included from DerivedSources/webkit/WebKitDOMHTMLElement.cpp:31:
./Source/WebCore/html/HTMLPropertiesCollection.h:52:42: error: 'namedItem' marked 'override' but does not override any member functions
    virtual PassRefPtr<PropertyNodeList> namedItem(const String&) const OVERRIDE;
                                         ^
./Source/WebCore/html/HTMLPropertiesCollection.h:52:42: warning: 'WebCore::HTMLPropertiesCollection::namedItem' hides overloaded virtual function [-Woverloaded-virtual]
./Source/WebCore/html/HTMLCollection.h:75:19: note: hidden overloaded virtual function 'WebCore::HTMLCollection::namedItem' declared here
    virtual Node* namedItem(const AtomicString& name) const;
                  ^
In file included from DerivedSources/webkit/WebKitDOMHTMLElement.cpp:26:
In file included from ./Source/WebCore/dom/Element.h:29:
In file included from ./Source/WebCore/dom/Document.h:33:
In file included from ./Source/WebCore/dom/ContainerNode.h:28:
In file included from ./Source/WebCore/dom/Node.h:34:
In file included from ./Source/WebCore/bindings/js/ScriptWrappable.h:34:
In file included from ./Source/WebCore/bindings/js/JSDOMWrapper.h:25:
In file included from ./Source/WebCore/bindings/js/JSDOMGlobalObject.h:31:
In file included from ./Source/JavaScriptCore/runtime/JSGlobalObject.h:25:
In file included from ./Source/JavaScriptCore/runtime/JSArray.h:24:
In file included from ./Source/JavaScriptCore/runtime/JSObject.h:28:
In file included from ./Source/JavaScriptCore/runtime/CommonIdentifiers.h:24:
./Source/JavaScriptCore/runtime/Identifier.h:183:33: warning: non-constant-expression cannot be narrowed from type 'int' to 'unsigned int' in initializer list
      [-Wc++11-narrowing]
        CharBuffer<T> buf = {s, length}; 
                                ^~~~~~
./Source/JavaScriptCore/runtime/Identifier.h:50:85: note: in instantiation of function template specialization 'JSC::Identifier::add<unsigned char>' requested here
        Identifier(JSGlobalData* globalData, const LChar* s, int length) : m_string(add(globalData, s, length)) { }
                                                                                    ^
./Source/JavaScriptCore/runtime/Identifier.h:183:33: note: override this message by inserting an explicit cast
        CharBuffer<T> buf = {s, length}; 
                                ^~~~~~
                                static_cast<unsigned int>( )
./Source/JavaScriptCore/runtime/Identifier.h:183:33: warning: non-constant-expression cannot be narrowed from type 'int' to 'unsigned int' in initializer list
      [-Wc++11-narrowing]
        CharBuffer<T> buf = {s, length}; 
                                ^~~~~~
./Source/JavaScriptCore/runtime/Identifier.h:51:85: note: in instantiation of function template specialization 'JSC::Identifier::add<unsigned short>' requested here
        Identifier(JSGlobalData* globalData, const UChar* s, int length) : m_string(add(globalData, s, length)) { }
                                                                                    ^
./Source/JavaScriptCore/runtime/Identifier.h:183:33: note: override this message by inserting an explicit cast
        CharBuffer<T> buf = {s, length}; 
                                ^~~~~~
                                static_cast<unsigned int>( )
3 warnings and 1 error generated.
Comment 1 Alexey Proskuryakov 2012-10-29 10:00:37 PDT
Looks like this should have been broken since r123434.

Is it really the case that no bots enforce OVERRIDE?
Comment 2 Tony Chang 2012-10-29 12:17:06 PDT
WebKitDOMHTMLElement.cpp appears to be part of the GTK+ build. I suspect they use gcc instead of clang.
Comment 3 Jeremy Huddleston Sequoia 2013-01-18 15:50:43 PST
webkitgtk-1.11.4 no longer has this issue.
Comment 4 Jeremy Huddleston Sequoia 2013-02-10 22:40:48 PST
Actually, this is still happening.  I see it on OS X Lion buidling webkit-gtk-1.11.4 for i386 with XCode 4.6
Comment 5 Ryosuke Niwa 2013-02-11 00:35:06 PST
This has been fixed in http://trac.webkit.org/changeset/137003.