reduce the amount of 'C++ magic' this code depends on :)

llvm-svn: 49489
This commit is contained in:
Chris Lattner 2008-04-10 16:37:40 +00:00
parent ea1bc3bec6
commit 5c7fce453d
2 changed files with 3 additions and 3 deletions

View File

@ -670,7 +670,7 @@ public:
struct FieldDeclarator {
Declarator D;
Action::ExprTy *BitfieldSize;
FieldDeclarator(DeclSpec &DS) : D(DS, Declarator::MemberContext) {
explicit FieldDeclarator(DeclSpec &DS) : D(DS, Declarator::MemberContext) {
BitfieldSize = 0;
}
};

View File

@ -677,7 +677,7 @@ ParseStructDeclaration(DeclSpec &DS,
}
// Read struct-declarators until we find the semicolon.
Fields.push_back(DS);
Fields.push_back(FieldDeclarator(DS));
while (1) {
FieldDeclarator &DeclaratorInfo = Fields.back();
@ -708,7 +708,7 @@ ParseStructDeclaration(DeclSpec &DS,
ConsumeToken();
// Parse the next declarator.
Fields.push_back(DS);
Fields.push_back(FieldDeclarator(DS));
// Attributes are only allowed on the second declarator.
if (Tok.is(tok::kw___attribute))