Skip to content

/llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:64: Pointless copy ? #94933

Closed
@dcb314

Description

@dcb314

Static analyser cppcheck says:

llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h:64:43: performance: Function parameter 'V' should be passed by const reference. [passedByValue]

Source code is

DWARFFormValue(dwarf::Form F, ValueType V) : Form(F), Value(V) {}

Suggest new code:

DWARFFormValue(dwarf::Form F, const ValueType & V) : Form(F), Value(V) {}

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