diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-08-31 22:24:06 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-08-31 22:24:06 +0000 |
commit | 97d744bea4e539b526fa78d0878fbc5e352003ca (patch) | |
tree | 99dc3f43127dc8d3dc1be91f9f3a3f62f53e5d54 /clang/lib/Parse/ParseObjc.cpp | |
parent | e1995f25667c1cc2ef50ed266f64e58c473c06dc (diff) | |
download | bcm5719-llvm-97d744bea4e539b526fa78d0878fbc5e352003ca.tar.gz bcm5719-llvm-97d744bea4e539b526fa78d0878fbc5e352003ca.zip |
objective-c: this patch (re)introduces objective-c's default property
synthesis. This new feature is currently placed under
-fobjc-default-synthesize-properties option
and is off by default pending further testing.
It will become the default feature soon.
// rdar://8843851
llvm-svn: 138913
Diffstat (limited to 'clang/lib/Parse/ParseObjc.cpp')
-rw-r--r-- | clang/lib/Parse/ParseObjc.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp index e3f79784200..c9a12b14df7 100644 --- a/clang/lib/Parse/ParseObjc.cpp +++ b/clang/lib/Parse/ParseObjc.cpp @@ -1401,22 +1401,23 @@ Parser::ParseObjCAtEndDeclaration(SourceRange atEnd) { "ParseObjCAtEndDeclaration(): Expected @end"); ConsumeToken(); // the "end" identifier SmallVector<Decl *, 8> DeclsInGroup; - + Actions.DefaultSynthesizeProperties(getCurScope(), ObjCImpDecl); for (size_t i = 0; i < LateParsedObjCMethods.size(); ++i) { Decl *D = ParseLexedObjCMethodDefs(*LateParsedObjCMethods[i]); DeclsInGroup.push_back(D); } - LateParsedObjCMethods.clear(); DeclsInGroup.push_back(ObjCImpDecl); + if (ObjCImpDecl) { Actions.ActOnAtEnd(getCurScope(), atEnd); - ObjCImpDecl = 0; PendingObjCImpDecl.pop_back(); } - else { + else // missing @implementation Diag(atEnd.getBegin(), diag::err_expected_implementation); - } + + LateParsedObjCMethods.clear(); + ObjCImpDecl = 0; return Actions.BuildDeclaratorGroup( DeclsInGroup.data(), DeclsInGroup.size(), false); } |