summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseObjc.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-03-04 22:30:12 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-03-04 22:30:12 +0000
commitb8d091c4eba5714db7aee32a01bc330dfe5e052b (patch)
tree992de7eb80b03511eb38e530384ab20743f1081e /clang/lib/Parse/ParseObjc.cpp
parent19ce8619daf153694a3e9798e7b88af6328bcd9b (diff)
downloadbcm5719-llvm-b8d091c4eba5714db7aee32a01bc330dfe5e052b.tar.gz
bcm5719-llvm-b8d091c4eba5714db7aee32a01bc330dfe5e052b.zip
Implemented access check for ivars accessed inside
c-style functions declared inside objc @implementations. llvm-svn: 66087
Diffstat (limited to 'clang/lib/Parse/ParseObjc.cpp')
-rw-r--r--clang/lib/Parse/ParseObjc.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp
index 3637d144d63..1cbc0e77483 100644
--- a/clang/lib/Parse/ParseObjc.cpp
+++ b/clang/lib/Parse/ParseObjc.cpp
@@ -1082,12 +1082,15 @@ Parser::DeclTy *Parser::ParseObjCAtImplementationDeclaration(
Parser::DeclTy *Parser::ParseObjCAtEndDeclaration(SourceLocation atLoc) {
assert(Tok.isObjCAtKeyword(tok::objc_end) &&
"ParseObjCAtEndDeclaration(): Expected @end");
+ DeclTy *Result = ObjCImpDecl;
ConsumeToken(); // the "end" identifier
- if (ObjCImpDecl)
+ if (ObjCImpDecl) {
Actions.ActOnAtEnd(atLoc, ObjCImpDecl);
+ ObjCImpDecl = 0;
+ }
else
Diag(atLoc, diag::warn_expected_implementation); // missing @implementation
- return ObjCImpDecl;
+ return Result;
}
/// compatibility-alias-decl:
OpenPOWER on IntegriCloud