Skip to content

performance-move-const-arg not detected with ternary #126515

@firewave

Description

@firewave
#include <string>

void func(const std::string&);

void f(bool b)
{
    std::string s;
    func(b ? "" : std::move(s));
}

https://godbolt.org/z/q8Phdzfea

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions