summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Parse')
-rw-r--r--clang/lib/Parse/ParseExpr.cpp3
-rw-r--r--clang/lib/Parse/ParseObjc.cpp7
2 files changed, 7 insertions, 3 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp
index 6c6842e0be6..4a81d30c846 100644
--- a/clang/lib/Parse/ParseExpr.cpp
+++ b/clang/lib/Parse/ParseExpr.cpp
@@ -852,7 +852,8 @@ Parser::ParsePostfixExpressionSuffix(OwningExprResult LHS) {
if (!LHS.isInvalid()) {
LHS = Actions.ActOnMemberReferenceExpr(CurScope, move(LHS), OpLoc,
OpKind, Tok.getLocation(),
- *Tok.getIdentifierInfo());
+ *Tok.getIdentifierInfo(),
+ ObjCImpDecl);
}
ConsumeToken();
break;
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