Skip to content

Crash when evaluating a constexpr static function template in an incomplete class context. #87971

Open
@cor3ntin

Description

@cor3ntin
struct  s{
  static constexpr auto f(auto extent) {
    return 0;
  }

  static constexpr auto a = f(0);
};

The following crashes after clang 17.

https://godbolt.org/z/o7zaK7qKq

I's unclear whether this should be well-formed (see #73232)

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partycrashPrefer [crash-on-valid] or [crash-on-invalid]regression

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions