The C++ grammar allows you to specify an attribute list on an anonymous bit-field, but we were not properly parsing that case. This would lead to a rejects-valid diagnostic with code like:
struct A { int x, [[]] : 0; };
This patch addresses it by optionally parsing an attribute specifier in the case the identifier is elided. This fixes PR46562.
Please retain the diagnostic wording using proper standard terminology; the other diagnostics say "in-class initializer" because they predate the existence of the standard terminology and haven't been fixed yet. (Fixing them -- and renaming the corresponding functions throughout Clang -- would be great if you feel so inclined.)