зеркало из https://github.com/microsoft/clang-1.git
Minor simplification for r161534.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161544 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
8c6cb46294
Коммит
dcdff46dd8
|
@ -1560,7 +1560,7 @@ private:
|
|||
Decl *TagDecl);
|
||||
|
||||
struct FieldCallback {
|
||||
virtual Decl *invoke(ParsingFieldDeclarator &Field) = 0;
|
||||
virtual void invoke(ParsingFieldDeclarator &Field) = 0;
|
||||
virtual ~FieldCallback() {}
|
||||
|
||||
private:
|
||||
|
|
|
@ -2891,14 +2891,13 @@ void Parser::ParseStructUnionBody(SourceLocation RecordLoc,
|
|||
SmallVectorImpl<Decl *> &FieldDecls) :
|
||||
P(P), TagDecl(TagDecl), FieldDecls(FieldDecls) {}
|
||||
|
||||
virtual Decl *invoke(ParsingFieldDeclarator &FD) {
|
||||
void invoke(ParsingFieldDeclarator &FD) {
|
||||
// Install the declarator into the current TagDecl.
|
||||
Decl *Field = P.Actions.ActOnField(P.getCurScope(), TagDecl,
|
||||
FD.D.getDeclSpec().getSourceRange().getBegin(),
|
||||
FD.D, FD.BitfieldSize);
|
||||
FieldDecls.push_back(Field);
|
||||
FD.complete(Field);
|
||||
return Field;
|
||||
}
|
||||
} Callback(*this, TagDecl, FieldDecls);
|
||||
|
||||
|
|
|
@ -308,16 +308,16 @@ public:
|
|||
MethodImplKind(MethodImplKind) {
|
||||
}
|
||||
|
||||
Decl *invoke(ParsingFieldDeclarator &FD) {
|
||||
void invoke(ParsingFieldDeclarator &FD) {
|
||||
if (FD.D.getIdentifier() == 0) {
|
||||
P.Diag(AtLoc, diag::err_objc_property_requires_field_name)
|
||||
<< FD.D.getSourceRange();
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
if (FD.BitfieldSize) {
|
||||
P.Diag(AtLoc, diag::err_objc_property_bitfield)
|
||||
<< FD.D.getSourceRange();
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
// Install the property declarator into interfaceDecl.
|
||||
|
@ -345,7 +345,6 @@ public:
|
|||
Props.push_back(Property);
|
||||
|
||||
FD.complete(Property);
|
||||
return Property;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1307,7 +1306,7 @@ void Parser::ParseObjCClassInstanceVariables(Decl *interfaceDecl,
|
|||
P(P), IDecl(IDecl), visibility(V), AllIvarDecls(AllIvarDecls) {
|
||||
}
|
||||
|
||||
Decl *invoke(ParsingFieldDeclarator &FD) {
|
||||
void invoke(ParsingFieldDeclarator &FD) {
|
||||
P.Actions.ActOnObjCContainerStartDefinition(IDecl);
|
||||
// Install the declarator into the interface decl.
|
||||
Decl *Field
|
||||
|
@ -1318,7 +1317,6 @@ void Parser::ParseObjCClassInstanceVariables(Decl *interfaceDecl,
|
|||
if (Field)
|
||||
AllIvarDecls.push_back(Field);
|
||||
FD.complete(Field);
|
||||
return Field;
|
||||
}
|
||||
} Callback(*this, interfaceDecl, visibility, AllIvarDecls);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче