| Summary: | WTF::CrossThreadCopierBase::copy() should use std::forward | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | David Kilzer (:ddkilzer) <ddkilzer> | ||||
| Component: | Web Template Framework | Assignee: | David Kilzer (:ddkilzer) <ddkilzer> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | benjamin, cdumez, cmarcelo, darin, ews-watchlist, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | Other | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
Created attachment 460098 [details]
Patch v1
Comment on attachment 460098 [details]
Patch v1
Marking cq+ as enough builds and test runs have completed that I think it's safe to land this.
Committed r295400 (251406@main): <https://commits.webkit.org/251406@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 460098 [details]. |
WTF::CrossThreadCopierBase::copy() should use std::forward. Found by clang static analyzer: In file included from OpenSource/Source/WTF/wtf/Language.cpp:29: OpenSource/Source/WTF/wtf/CrossThreadCopier.h:225:106: warning: Forwarding reference passed to std::move(), which may unexpectedly cause lvalues to be moved; use std::forward() instead [bugprone-move-forwarding-reference] return CrossThreadCopier<std::remove_const_t<std::remove_reference_t<decltype(type)>>>::copy(WTFMove(type)); ^