Skip to content

[clang] crash on the simplest code. #141693

Open
@yaoxinliu

Description

@yaoxinliu
#include <concepts>

template<typename T>
concept IsOK = []<typename U> consteval -> bool {    
    return requires { requires std::same_as<typename U::InnerType, void>; };
}.template operator()<T>();

static_assert(!IsOK<int>);

int main() {}

The above code is simple and legal. However, clangd will crash when parsing it.

This is a regression back to clang-16. clang-15 is ok, see https://godbolt.org/z/e5jof54eo

Related issue: #141732

Metadata

Metadata

Assignees

Labels

clang:frontendLanguage frontend issues, e.g. anything involving "Sema"crashPrefer [crash-on-valid] or [crash-on-invalid]regression:16Regression in 16 release

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions