aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseObjc.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-08-31 22:24:06 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-08-31 22:24:06 +0000
commit8697d308c1bdd50e5c45757ac11be701c26e9e97 (patch)
tree59afd9cf6f5b60347b1c2886b66bd4d0e1d28162 /lib/Parse/ParseObjc.cpp
parente082af17d4b425a49f7f8bccc2a99810f0072828 (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138913 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r--lib/Parse/ParseObjc.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index e3f7978420..c9a12b14df 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/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);
}