[Webkit-unassigned] [Bug 192710] New: clang-tidy: Fix unnecessary copy of AtomicString each time one is logged

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 14 12:51:16 PST 2018


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

            Bug ID: 192710
           Summary: clang-tidy: Fix unnecessary copy of AtomicString each
                    time one is logged
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Template Framework
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ddkilzer at webkit.org
                CC: eric.carlson at apple.com

Running `clang-tidy -header-filter=.* -checks='-*,performance-*,-performance-noexcept-*' ...` on WebCore source files found this unnecessary object copy:

$BUILD_DIR/Release/usr/local/include/wtf/Logger.h:47:173: warning: the parameter 'argument' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
    template<typename U = T> static typename std::enable_if<std::is_same<typename std::remove_reference<U>::type, AtomicString>::value, String>::type toString(AtomicString argument) { return argument.string(); }
                                                                                                                                                                            ^
                                                                                                                                                               const       &

-- 
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/20181214/c342e977/attachment.html>


More information about the webkit-unassigned mailing list