WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
192751
clang-tidy: loop variable is copied but only used as const reference in WebCore, WebKit, Tools
https://bugs.webkit.org/show_bug.cgi?id=192751
Summary
clang-tidy: loop variable is copied but only used as const reference in WebCo...
David Kilzer (:ddkilzer)
Reported
2018-12-17 01:37:13 PST
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]
Attachments
Patch v1
(38.55 KB, patch)
2018-12-17 01:57 PST
,
David Kilzer (:ddkilzer)
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2018-12-17 01:37:41 PST
<
rdar://problem/46771623
>
David Kilzer (:ddkilzer)
Comment 2
2018-12-17 01:57:18 PST
Created
attachment 357431
[details]
Patch v1
WebKit Commit Bot
Comment 3
2018-12-17 06:22:50 PST
Comment on
attachment 357431
[details]
Patch v1 Clearing flags on attachment: 357431 Committed
r239266
: <
https://trac.webkit.org/changeset/239266
>
WebKit Commit Bot
Comment 4
2018-12-17 06:22:52 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug