Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lldb] Use const reference for range variables to improve performance (NFC) #94840

Merged
merged 1 commit into from
Jun 8, 2024

Commits on Jun 8, 2024

  1. [lldb] Use const reference for range variables to improve performance…

    … (NFC)
    
    Cppcheck recommends using a const reference for range variables in a for-each loop.
    This avoids unnecessary copying of elements, improving performance.
    
    Caught by cppcheck -
    lldb/source/API/SBBreakpoint.cpp:717:22: performance: Range variable 'name' should be declared as const reference. [iterateByValue]
    lldb/source/API/SBTarget.cpp:1150:15: performance: Range variable 'name' should be declared as const reference. [iterateByValue]
    lldb/source/Breakpoint/Breakpoint.cpp:888:26: performance: Range variable 'name' should be declared as const reference. [iterateByValue]
    lldb/source/Breakpoint/BreakpointIDList.cpp:262:26: performance: Range variable 'name' should be declared as const reference. [iterateByValue]
    
    Fix llvm#91213
    Fix llvm#91217
    Fix llvm#91219
    Fix llvm#91220
    xgupta committed Jun 8, 2024
    Configuration menu
    Copy the full SHA
    ebfb9d8 View commit details
    Browse the repository at this point in the history