aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseObjc.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-03-18 22:33:24 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-03-18 22:33:24 +0000
commit38e24c782c17b6058bf61d635747bbde19fb1bc7 (patch)
treebeb09e8aa66b92cfbc7ecb904fb34f8fb578dd61 /lib/Parse/ParseObjc.cpp
parente530ad407af4a8904377592bfdb236acd320c6c2 (diff)
objc: Implemented variables declared in class interface
whose sema decl is at the translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67249 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r--lib/Parse/ParseObjc.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index bb85536cd4..ca722fa68d 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -215,6 +215,7 @@ void Parser::ParseObjCInterfaceDeclList(DeclTy *interfaceDecl,
tok::ObjCKeywordKind contextKey) {
llvm::SmallVector<DeclTy*, 32> allMethods;
llvm::SmallVector<DeclTy*, 16> allProperties;
+ llvm::SmallVector<DeclTy*, 8> allTUVariables;
tok::ObjCKeywordKind MethodImplKind = tok::objc_not_keyword;
SourceLocation AtEndLoc;
@@ -252,7 +253,8 @@ void Parser::ParseObjCInterfaceDeclList(DeclTy *interfaceDecl,
// FIXME: as the name implies, this rule allows function definitions.
// We could pass a flag or check for functions during semantic analysis.
- ParseDeclarationOrFunctionDefinition();
+ DeclTy *VFDecl = ParseDeclarationOrFunctionDefinition();
+ allTUVariables.push_back(VFDecl);
continue;
}
@@ -360,7 +362,10 @@ void Parser::ParseObjCInterfaceDeclList(DeclTy *interfaceDecl,
allMethods.empty() ? 0 : &allMethods[0],
allMethods.size(),
allProperties.empty() ? 0 : &allProperties[0],
- allProperties.size());
+ allProperties.size(),
+ allTUVariables.empty() ? 0 :
+ &allTUVariables[0],
+ allTUVariables.size());
}
/// Parse property attribute declarations.