Skip to content

Missing warning for using deprecated template with CTAD #160543

@timsong-cpp

Description

@timsong-cpp

Clang doesn't issue a deprecation warning on this code, but it probably should:

template<class F>
struct [[deprecated]] X { X(F);};

void f() {
    X x{0};
}

Explicitly providing the template arguments as X<int> does trigger a warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerfalse-negativeWarning doesn't fire when it should

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions