aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2012-08-10 15:54:40 +0000
committerFariborz Jahanian <fjahanian@apple.com>2012-08-10 15:54:40 +0000
commitbe1d4ecb6885872f9d4e02d3afafdc9532eeb350 (patch)
tree37c3398d5e8cd41264849e683d1d5704bc1e5ccd /lib/Parse/ParseDecl.cpp
parent7094dee95f8c915d27097ac18b47d1ef31fd72ed (diff)
objective-C++: Delayed parsing of most common
member functions defined inside an objc class implementation. wip. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161667 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r--lib/Parse/ParseDecl.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index 9f8f3cec28..b830d9ccfd 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -1340,12 +1340,7 @@ Parser::DeclGroupPtrTy Parser::ParseDeclGroup(ParsingDeclSpec &DS,
// Look at the next token to make sure that this isn't a function
// declaration. We have to check this because __attribute__ might be the
// start of a function definition in GCC-extended K&R C.
- // FIXME. Delayed parsing not done for c/c++ functions nested in namespace
- !isDeclarationAfterDeclarator() &&
- (!CurParsedObjCImpl || Tok.isNot(tok::l_brace) ||
- (getLangOpts().CPlusPlus &&
- (D.getCXXScopeSpec().isSet() ||
- !Actions.CurContext->isTranslationUnit())))) {
+ !isDeclarationAfterDeclarator()) {
if (isStartOfFunctionDefinition(D)) {
if (DS.getStorageClassSpec() == DeclSpec::SCS_typedef) {
@@ -1401,14 +1396,6 @@ Parser::DeclGroupPtrTy Parser::ParseDeclGroup(ParsingDeclSpec &DS,
DeclsInGroup.push_back(FirstDecl);
bool ExpectSemi = Context != Declarator::ForContext;
-
- if (CurParsedObjCImpl && D.isFunctionDeclarator() &&
- Tok.is(tok::l_brace)) {
- // Consume the tokens and store them for later parsing.
- StashAwayMethodOrFunctionBodyTokens(FirstDecl);
- CurParsedObjCImpl->HasCFunction = true;
- ExpectSemi = false;
- }
// If we don't have a comma, it is either the end of the list (a ';') or an
// error, bail out.