[Webkit-unassigned] [Bug 193443] New: clang-tidy: Fix unnecessary copy of for loop variables in ANGLE

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 15 05:04:52 PST 2019


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

            Bug ID: 193443
           Summary: clang-tidy: Fix unnecessary copy of for loop variables
                    in ANGLE
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: ANGLE
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ddkilzer at webkit.org
                CC: achristensen at apple.com, dino at apple.com

Running clang-tidy on ANGLE resulted in these potential performance improvements to prevent object copies in for loops:

Source/ThirdParty/ANGLE/src/compiler/translator/Compiler.cpp:1070:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
    for (auto block : uniformBlocks)
              ^
         const  &
Source/ThirdParty/ANGLE/src/compiler/translator/Compiler.cpp:1087:19: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
        for (auto var : outputVaryings)
                  ^
             const  &
Source/ThirdParty/ANGLE/src/compiler/translator/Compiler.cpp:1100:19: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
        for (auto var : outputVariables)
                  ^
             const  &

Source/ThirdParty/ANGLE/src/compiler/preprocessor/MacroExpander.cpp:73:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
    for (auto macro : mExpander->mMacrosToReenable)
              ^
         const  &

Source/ThirdParty/ANGLE/src/libANGLE/Program.cpp:195:15: warning: loop variable is copied but only used as const reference; consider making it a const reference [performance-for-range-copy]
    for (auto nameInSet : nameSet)
              ^
         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/20190115/41300f14/attachment.html>


More information about the webkit-unassigned mailing list