Skip to content

Clang accepts incorrect template decl #161514

@wangbo15

Description

@wangbo15

The following code is accepted by clang-trunk, while GCC and MSVC reject it.

template <typename>
concept a = b<[] {}>();
int main() {}

Please refer to: https://godbolt.org/z/hvr3xn5xd

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepts-invalidclang:frontendLanguage frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partydiverges-from:gccDoes the clang frontend diverge from gcc on this issuediverges-from:msvcDoes the clang frontend diverge from msvc on this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions