Skip to content

[Clang] Accepts invalid auto on a declaration of class #114753

Open
@YuchangSu

Description

@YuchangSu
auto class X1 { } ;

See Compiler Explorer: https://godbolt.org/z/3WheK64E3
auto can only be specified for variables or function declarations.It is rejected by GCC, but accepted by Clang.

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepts-invalidclang:frontendLanguage frontend issues, e.g. anything involving "Sema"confirmedVerified by a second party

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions