// Parse the common specifier-qualifiers-list piece.
DeclSpec DS;
- SourceLocation SpecQualLoc = Tok.getLocation();
+ SourceLocation DSStart = Tok.getLocation();
ParseSpecifierQualifierList(DS);
// TODO: Does specifier-qualifier list correctly check that *something* is
// specified?
// If there are no declarators, issue a warning.
if (Tok.is(tok::semi)) {
- Diag(SpecQualLoc, diag::w_no_declarators);
+ Diag(DSStart, diag::w_no_declarators);
return;
}
if (Tok.is(tok::colon)) {
ConsumeToken();
ExprResult Res = ParseConstantExpression();
- if (Res.isInvalid) {
+ if (Res.isInvalid)
SkipUntil(tok::semi, true, true);
- } else {
+ else
BitfieldSize = Res.Val;
- }
}
// If attributes exist after the declarator, parse them.
DeclaratorInfo.AddAttributes(ParseAttributes());
// Install the declarator into the current TagDecl.
- DeclTy *Field = Actions.ActOnField(CurScope, TagDecl, SpecQualLoc,
+ DeclTy *Field = Actions.ActOnField(CurScope, TagDecl,
+ DS.getSourceRange().getBegin(),
DeclaratorInfo, BitfieldSize);
FieldDecls.push_back(Field);