Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cor3ntin opened this issue Apr 8, 2024 · 2 comments
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" confirmed Verified by a second party crash Prefer [crash-on-valid] or [crash-on-invalid] regression

Comments

@cor3ntin
Copy link
Contributor

cor3ntin commented Apr 8, 2024

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)

@cor3ntin cor3ntin added clang:frontend Language frontend issues, e.g. anything involving "Sema" regression crash Prefer [crash-on-valid] or [crash-on-invalid] labels Apr 8, 2024
@llvmbot
Copy link
Member

llvmbot commented Apr 8, 2024

@llvm/issue-subscribers-clang-frontend

Author: cor3ntin (cor3ntin)

```cpp 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)



</details>

@shafik
Copy link
Collaborator

shafik commented Apr 8, 2024

Confirmed.

Maybe duplicate of: #84522

@shafik shafik added the confirmed Verified by a second party label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" confirmed Verified by a second party crash Prefer [crash-on-valid] or [crash-on-invalid] regression
Projects
None yet
Development

No branches or pull requests

3 participants