Skip to content

[bug][clang] SBC when generating code for calls to explicitly defined ctors of implicit specializations #153455

@cdacamar

Description

@cdacamar

Here's the smallest repro:

void doit();

template <typename>
struct Z {
  Z() = delete;
};

template <>
Z<int>::Z() { doit(); }

int main() {
    Z<int> z;
}

When clang compiles this sample, the call to the ctor is completely gone in the generated code regardless of optimization level.

This is the more elaborate repro: https://godbolt.org/z/PM1vx7oa5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c++clang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions