Skip to content

Wignored-qualifiers emits a false positive warning for user defined types returned by const auto #43054

@Kurkin

Description

@Kurkin
Bugzilla Link 43709
Version trunk
OS All
CC @aaronpuchert,@Quuxplusone,@DougGregor,@yeputons,@zygoloid

Extended Description

Consider the example:

struct S{};

const auto bar() { return S{}; } // false positive warning
const S bar1() { return S{}; }

https://godbolt.org/z/XE3F69

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillac++clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerfalse-positiveWarning fires when it should not

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions