[Webkit-unassigned] [Bug 192751] New: clang-tidy: loop variable is copied but only used as const reference in WebCore, WebKit, Tools

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 17 01:37:13 PST 2018


https://bugs.webkit.org/show_bug.cgi?id=192751

            Bug ID: 192751
           Summary: clang-tidy: loop variable is copied but only used as
                    const reference in WebCore, WebKit, Tools
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ddkilzer at webkit.org
                CC: achristensen at apple.com, dbates at webkit.org

Running `clang-tidy -header-filter=.* -checks='-*,performance-*,-performance-noexcept-*' ...` on WebCore, WebKit and Tools source files found these unnecessary object copies in for loop variables in trunk revision r239112.

WebCore:

Source/WebCore/platform/graphics/mac/ImageMac.mm:91:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:224:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:260:19: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp:341:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp:534:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:424:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/Modules/indexeddb/shared/IDBDatabaseInfo.cpp:50:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/Modules/mediasource/SourceBuffer.cpp:742:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/accessibility/AccessibilityRenderObject.cpp:2526:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/accessibility/AccessibilityTableRow.cpp:138:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/animation/KeyframeEffect.cpp:957:23: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/crypto/keys/CryptoKeyRSA.cpp:95:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/crypto/keys/CryptoKeyRSA.cpp:140:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/css/CSSComputedStyleDeclaration.cpp:1148:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/dom/DataTransfer.cpp:149:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/dom/TreeScope.cpp:409:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp:137:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/page/Page.cpp:1266:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/page/TextIndicator.cpp:255:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/page/animation/KeyframeAnimation.cpp:98:23: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/platform/graphics/DisplayRefreshMonitorManager.cpp:130:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:691:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:2849:19: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:2885:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/rendering/HitTestResult.cpp:685:19: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/html/track/WebVTTParser.cpp:341:19: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebCore/testing/Internals.cpp:1071:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]

WebKit:

Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:520:40: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebKit/UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:639:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.cpp:231:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebKit/UIProcess/ResourceLoadStatisticsMemoryStore.cpp:880:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebKit/UIProcess/WebPageProxy.cpp:8138:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:1201:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:1642:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:1749:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:1784:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:1796:19: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebKit/UIProcess/Plugins/PluginProcessManager.cpp:126:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebKit/UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp:88:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebKit/UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp:121:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebKit/UIProcess/WebStorage/LocalStorageDatabaseTracker.cpp:140:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:532:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebKit/WebProcess/WebPage/WebPage.cpp:617:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerConnection.cpp:75:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]

Tools:

Tools/DumpRenderTree/mac/DumpRenderTreePasteboard.mm:243:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]

-- 
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/20181217/b56aa0b9/attachment-0001.html>


More information about the webkit-unassigned mailing list