Since 72af746 (#208552), clang rejects a declaration of the form:
when NAME also names a type and <token> is not on the list that #208552 introduced. tok::l_brace was added to that list by #210347, but tok::kw_asm, tok::kw___attribute and tok::kw_alignas seem to be missing:
https://godbolt.org/z/av3zWe8xf
struct Foo {};
struct Bar {};
struct Baz {};
auto Foo asm("foo_label") = 0; // (1)
auto Bar __attribute__((unused)) = 0; // (2)
auto Baz alignas(4) = 0; // (3)
Clang releases predating 72af746 accept all of these. I'm not sure if this is expected or a regression.
CC @to268
Since 72af746 (#208552), clang rejects a declaration of the form:
when
NAMEalso names a type and<token>is not on the list that #208552 introduced.tok::l_bracewas added to that list by #210347, buttok::kw_asm,tok::kw___attributeandtok::kw_alignasseem to be missing:https://godbolt.org/z/av3zWe8xf
Clang releases predating 72af746 accept all of these. I'm not sure if this is expected or a regression.
CC @to268