Closed Bug 1484966 Opened Last year Closed Last year

Fix clang-tidy warnings and whitespace for layout/painting/

Categories

(Core :: Web Painting, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: miko, Assigned: miko)

Details

Attachments

(3 files)

Running |mach static-analysis check layout/painting/| shows quite a few warnings. This patch fixes those (part 1), as well as warnings for modernize-use-override (part 2). Part 3 is the result of |mach clang-format --path layout/painting/|.
Priority: -- → P3
Comment on attachment 9002727 [details]
Bug 1484966 - Part 3: Clang format layout/painting/ r=mattwoodrow

Matt Woodrow (:mattwoodrow) has approved the revision.
Attachment #9002727 - Flags: review+
Comment on attachment 9002725 [details]
Bug 1484966 - Part 1: Fix most clang-tidy warnings for layout/painting/ r=mattwoodrow

Matt Woodrow (:mattwoodrow) has approved the revision.
Attachment #9002725 - Flags: review+
Comment on attachment 9002726 [details]
Bug 1484966 - Part 2: Fix virtual/override specifiers and whitespace r=mattwoodrow

Matt Woodrow (:mattwoodrow) has approved the revision.
Attachment #9002726 - Flags: review+
Pushed by mikokm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/fe8d9d97dd26
Part 1: Fix most clang-tidy warnings for layout/painting/ r=mattwoodrow
Pushed by mikokm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/399158a0a9b3
Part 2: Fix virtual/override specifiers and whitespace r=mattwoodrow
Pushed by mikokm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/7b246c8f9de8
Part 3: Clang format layout/painting/ r=mattwoodrow
Backed out for bustage on RefPtr.h:42

backout: https://hg.mozilla.org/integration/autoland/rev/895320802eb428bd7f7c54a6c55a2d8b97734cc8

push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=399158a0a9b3871b358cbbcb50d8c097b1422514

failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=197463243&repo=autoland&lineNumber=22272

[task 2018-09-04T20:34:11.503Z] 20:34:11     INFO -  /builds/worker/workspace/build/src/sccache2/sccache /builds/worker/workspace/build/src/clang/bin/clang++ -o Unified_cpp_gfx_layers1.o -c  -I/builds/worker/workspace/build/src/obj-firefox/dist/stl_wrappers -I/builds/worker/workspace/build/src/obj-firefox/dist/system_wrappers -include /builds/worker/workspace/build/src/config/gcc_hidden.h -DDEBUG=1 -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DOS_POSIX=1 -DOS_LINUX=1 -DD3D_DEBUG_INFO -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/worker/workspace/build/src/gfx/layers -I/builds/worker/workspace/build/src/obj-firefox/gfx/layers -I/builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/_ipdlheaders -I/builds/worker/workspace/build/src/ipc/chromium/src -I/builds/worker/workspace/build/src/ipc/glue -I/builds/worker/workspace/build/src/docshell/base -I/builds/worker/workspace/build/src/layout/base -I/builds/worker/workspace/build/src/layout/generic -I/builds/worker/workspace/build/src/media/libyuv/libyuv/include -I/builds/worker/workspace/build/src/gfx/skia -I/builds/worker/workspace/build/src/gfx/skia/skia/include/config -I/builds/worker/workspace/build/src/gfx/skia/skia/include/core -I/builds/worker/workspace/build/src/gfx/skia/skia/include/gpu -I/builds/worker/workspace/build/src/gfx/skia/skia/include/utils -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h -Qunused-arguments -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Qunused-arguments -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -Wno-return-type-c-linkage -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Xclang -load -Xclang /builds/worker/workspace/build/src/obj-firefox/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -Os -fno-omit-frame-pointer -Werror -I/builds/worker/workspace/build/src/obj-firefox/dist/include/cairo -I/builds/worker/workspace/build/src/widget/gtk/compat-gtk3 -pthread -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/gtk-3.0/unix-print -Wno-error=shadow -Wno-maybe-uninitialized  -MD -MP -MF .deps/Unified_cpp_gfx_layers1.o.pp   /builds/worker/workspace/build/src/obj-firefox/gfx/layers/Unified_cpp_gfx_layers1.cpp
[task 2018-09-04T20:34:11.503Z] 20:34:11     INFO -  In file included from /builds/worker/workspace/build/src/obj-firefox/gfx/layers/Unified_cpp_gfx_layers1.cpp:2:
[task 2018-09-04T20:34:11.503Z] 20:34:11     INFO -  In file included from /builds/worker/workspace/build/src/gfx/layers/LayerSorter.cpp:7:
[task 2018-09-04T20:34:11.503Z] 20:34:11     INFO -  In file included from /builds/worker/workspace/build/src/gfx/layers/LayerSorter.h:10:
[task 2018-09-04T20:34:11.503Z] 20:34:11     INFO -  In file included from /builds/worker/workspace/build/src/obj-firefox/dist/include/nsTArray.h:29:
[task 2018-09-04T20:34:11.503Z] 20:34:11     INFO -  In file included from /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCycleCollectionNoteChild.h:13:
[task 2018-09-04T20:34:11.504Z] 20:34:11     INFO -  In file included from /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCycleCollectionTraversalCallback.h:12:
[task 2018-09-04T20:34:11.504Z] 20:34:11     INFO -  In file included from /builds/worker/workspace/build/src/obj-firefox/dist/include/nsISupports.h:79:
[task 2018-09-04T20:34:11.504Z] 20:34:11     INFO -  In file included from /builds/worker/workspace/build/src/obj-firefox/dist/include/nsISupportsUtils.h:15:
[task 2018-09-04T20:34:11.504Z] 20:34:11     INFO -  /builds/worker/workspace/build/src/gfx/layers/../../mfbt/RefPtr.h:42:9: error: member access into incomplete type 'nsCaret'
[task 2018-09-04T20:34:11.504Z] 20:34:11     INFO -      aPtr->Release();
[task 2018-09-04T20:34:11.504Z] 20:34:11     INFO -          ^
[task 2018-09-04T20:34:11.504Z] 20:34:11     INFO -  /builds/worker/workspace/build/src/gfx/layers/../../mfbt/RefPtr.h:407:33: note: in instantiation of member function 'mozilla::RefPtrTraits<nsCaret>::Release' requested here
[task 2018-09-04T20:34:11.504Z] 20:34:11     INFO -        mozilla::RefPtrTraits<U>::Release(aPtr);
[task 2018-09-04T20:34:11.504Z] 20:34:11     INFO -                                  ^
[task 2018-09-04T20:34:11.504Z] 20:34:11     INFO -  /builds/worker/workspace/build/src/gfx/layers/../../mfbt/RefPtr.h:80:37: note: in instantiation of member function 'RefPtr<nsCaret>::ConstRemovingRefPtrTraits<nsCaret>::Release' requested here
[task 2018-09-04T20:34:11.504Z] 20:34:11     INFO -        ConstRemovingRefPtrTraits<T>::Release(mRawPtr);
[task 2018-09-04T20:34:11.504Z] 20:34:11     INFO -                                      ^
[task 2018-09-04T20:34:11.505Z] 20:34:11     INFO -  /builds/worker/workspace/build/src/obj-firefox/dist/include/nsDisplayList.h:3921:3: note: in instantiation of member function 'RefPtr<nsCaret>::~RefPtr' requested here
[task 2018-09-04T20:34:11.505Z] 20:34:11     INFO -    ~nsDisplayCaret() override
[task 2018-09-04T20:34:11.506Z] 20:34:11     INFO -    ^
[task 2018-09-04T20:34:11.506Z] 20:34:11     INFO -  /builds/worker/workspace/build/src/layout/base/nsIPresShell.h:57:7: note: forward declaration of 'nsCaret'
[task 2018-09-04T20:34:11.506Z] 20:34:11     INFO -  class nsCaret;
[task 2018-09-04T20:34:11.507Z] 20:34:11     INFO -        ^
[task 2018-09-04T20:34:11.507Z] 20:34:11     INFO -  1 error generated.
[task 2018-09-04T20:34:11.508Z] 20:34:11     INFO -  /builds/worker/workspace/build/src/config/rules.mk:1110: recipe for target 'Unified_cpp_gfx_layers1.o' failed
[task 2018-09-04T20:34:11.508Z] 20:34:11     INFO -  make[4]: *** [Unified_cpp_gfx_layers1.o] Error 1
[task 2018-09-04T20:34:11.508Z] 20:34:11     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/gfx/layers'
[task 2018-09-04T20:34:11.509Z] 20:34:11     INFO -  make[4]: *** Waiting for unfinished jobs....
Flags: needinfo?(mikokm)
I had a local fix for this that I forgot to include. Re-landing.
Flags: needinfo?(mikokm)
Pushed by mikokm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/400dede23df2
Part 2: Fix virtual/override specifiers and whitespace r=mattwoodrow
Pushed by mikokm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/8e94abbf3ef9
Part 3: Clang format layout/painting/ r=mattwoodrow
https://hg.mozilla.org/mozilla-central/rev/400dede23df2
https://hg.mozilla.org/mozilla-central/rev/8e94abbf3ef9
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.