I just noticed the following code fragment in ParseClassSpecifier:
// Parse the tag portion of this.
DeclTy *TagDecl = Actions.ActOnTag(CurScope, TagType, TK, StartLoc,
Name,
NameLoc, Attr);
// Parse the optional base clause (C++ only).
if (getLang().CPlusPlus && Tok.is(tok::colon)) {
ParseBaseClause(TagDecl);
}
It appears from the code that the 'if' branch can be taken even if the
tag decl is a union. Is this valid in the C++ grammar? That is, can
there be a "base clause" for unions in C++, and if so, what does that
mean?