Skip to content

llvm/lib/Support/GraphWriter.cpp:118: Clumsy string resize ? #90324

Closed
@dcb314

Description

@dcb314

Static analyser cppcheck says:

llvm/lib/Support/GraphWriter.cpp:118:7: performance: Ineffective call of function 'substr' because a prefix of the string is assigned to itself. Use resize() or pop_back() instead. [uselessCallsSubstr]

Source code is

N = N.substr(0, std::minstd::size_t(N.size(), 140));

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