aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseObjc.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-08-09 17:15:00 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-08-09 17:15:00 +0000
commitc9b970996b8af41754a99a9cec15a9d401962ba1 (patch)
tree817f9f6af7d16d09c23656bdd93e2172cf3c30f3 /lib/Parse/ParseObjc.cpp
parentfc05decf08feefd2ffe8cc250219aee6eab3119c (diff)
objective-C: minor refactoring in method
definition parsing logic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161593 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r--lib/Parse/ParseObjc.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index b0aab88542..69e6d0a43f 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -1971,15 +1971,10 @@ Decl *Parser::ParseObjCMethodDefinition() {
// Allow the rest of sema to find private method decl implementations.
Actions.AddAnyMethodToGlobalPool(MDecl);
-
- if (CurParsedObjCImpl) {
- // Consume the tokens and store them for later parsing.
- StashAwayMethodOrFunctionBodyTokens(MDecl);
- } else {
- ConsumeBrace();
- SkipUntil(tok::r_brace, /*StopAtSemi=*/false);
- }
-
+ assert (CurParsedObjCImpl
+ && "ParseObjCMethodDefinition - Method out of @implementation");
+ // Consume the tokens and store them for later parsing.
+ StashAwayMethodOrFunctionBodyTokens(MDecl);
return MDecl;
}