Bug 241437 - WebGPU::ShaderModule::convertCheckResult() should use std::forward
Summary: WebGPU::ShaderModule::convertCheckResult() should use std::forward
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Kilzer (:ddkilzer)
Keywords: InRadar
Depends on:
Reported: 2022-06-08 13:46 PDT by David Kilzer (:ddkilzer)
Modified: 2022-06-08 21:56 PDT (History)
4 users (show)

See Also:

Patch v1 (1.16 KB, patch)
2022-06-08 14:05 PDT, David Kilzer (:ddkilzer)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2022-06-08 13:46:27 PDT
WebGPU::ShaderModule::convertCheckResult() should use std::forward.

Found by clang static analyzer:

Source/WebGPU/WebGPU/ShaderModule.mm:125:16: warning: Forwarding reference passed to std::move(), which may unexpectedly cause lvalues to be moved; use std::forward() instead [bugprone-move-forwarding-reference]
        return WTFMove(check);
Comment 1 Radar WebKit Bug Importer 2022-06-08 13:46:44 PDT
Comment 2 David Kilzer (:ddkilzer) 2022-06-08 14:05:15 PDT
Created attachment 460102 [details]
Patch v1
Comment 3 David Kilzer (:ddkilzer) 2022-06-08 21:06:54 PDT
Comment on attachment 460102 [details]
Patch v1

Marking as cq+ since enough builds/tests have passed.
Comment 4 EWS 2022-06-08 21:56:06 PDT
Committed r295409 (251415@main): <https://commits.webkit.org/251415@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 460102 [details].