[Webkit-unassigned] [Bug 192661] New: clang-tidy: loop variable is copied but only used as const reference in Document.cpp, Element.cpp
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Dec 13 04:10:30 PST 2018
https://bugs.webkit.org/show_bug.cgi?id=192661
Bug ID: 192661
Summary: clang-tidy: loop variable is copied but only used as
const reference in Document.cpp, Element.cpp
Product: WebKit
Version: WebKit Local Build
Hardware: Unspecified
URL: http://clang.llvm.org/extra/clang-tidy/checks/performa
nce-for-range-copy.html
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: HTML DOM
Assignee: webkit-unassigned at lists.webkit.org
Reporter: ddkilzer at webkit.org
CC: ajuma at chromium.org, cdumez at apple.com,
simon.fraser at apple.com
Depends on: 188670
Running `clang-tidy '-checks=-*,performance-for-range-copy' ...` on Document.cpp and Element.cpp finds these unnecessary copies:
Source/WebCore/dom/Document.cpp:7907:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
for (auto observer : m_intersectionObserversWithPendingNotifications) {
^
const &
Source/WebCore/dom/Element.cpp:1777:19: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
for (auto observer : observerData->observers) {
^
const &
Source/WebCore/dom/Element.cpp:3399:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
for (auto observer : observerData->observers)
^
const &
Referenced Bugs:
https://bugs.webkit.org/show_bug.cgi?id=188670
[Bug 188670] [IntersectionObserver] Fire an initial dummy notification
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181213/100b94da/attachment.html>
More information about the webkit-unassigned
mailing list