Skip to content

clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:697: possible performance problem ? #79684

@dcb314

Description

@dcb314

Static analyser cppcheck says:

trunk/clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:697:24: performance: Function parameter 'ArgTys' should be passed by const reference. [passedByValue]

Source code is

Signature(ArgTypes ArgTys, RetType RetTy) {

but

using ArgTypes = std::vector<std::optional>;

So it looks to me like an entire vector is put onto the stack.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions