diff options
-rw-r--r-- | include/clang/Parse/Parser.h | 2 | ||||
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 3 | ||||
-rw-r--r-- | lib/Parse/ParseObjc.cpp | 10 |
3 files changed, 6 insertions, 9 deletions
diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h index f02abc60fd..5faac1b9f9 100644 --- a/include/clang/Parse/Parser.h +++ b/include/clang/Parse/Parser.h @@ -1560,7 +1560,7 @@ private: Decl *TagDecl); struct FieldCallback { - virtual Decl *invoke(ParsingFieldDeclarator &Field) = 0; + virtual void invoke(ParsingFieldDeclarator &Field) = 0; virtual ~FieldCallback() {} private: diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index a1e17a8f99..9f8f3cec28 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -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); diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp index e401983a7e..b0aab88542 100644 --- a/lib/Parse/ParseObjc.cpp +++ b/lib/Parse/ParseObjc.cpp @@ -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); |