summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-06-22 23:20:40 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-06-22 23:20:40 +0000
commit3bf0ded346b3b8fdc62d208661b869d6122586df (patch)
tree1b735ed2d4da4a54932281d6b4b60fc64600c51b /clang/lib/AST/ASTContext.cpp
parentc646d130548a032cdcc932487e981f3a242d6d91 (diff)
downloadbcm5719-llvm-3bf0ded346b3b8fdc62d208661b869d6122586df.tar.gz
bcm5719-llvm-3bf0ded346b3b8fdc62d208661b869d6122586df.zip
Patch to provide separate ASTs for multiple ObjC class extension
declarations (implements radar 7928731). llvm-svn: 106597
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index bb62e9efd58..80bda841feb 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -868,7 +868,8 @@ void ASTContext::ShallowCollectObjCIvars(const ObjCInterfaceDecl *OI,
void ASTContext::CollectNonClassIvars(const ObjCInterfaceDecl *OI,
llvm::SmallVectorImpl<ObjCIvarDecl*> &Ivars) {
// Find ivars declared in class extension.
- if (const ObjCCategoryDecl *CDecl = OI->getClassExtension()) {
+ for (const ObjCCategoryDecl *CDecl = OI->getFirstClassExtension(); CDecl;
+ CDecl = CDecl->getNextClassExtension()) {
for (ObjCCategoryDecl::ivar_iterator I = CDecl->ivar_begin(),
E = CDecl->ivar_end(); I != E; ++I) {
Ivars.push_back(*I);
@@ -933,7 +934,8 @@ void ASTContext::CollectInheritedProtocols(const Decl *CDecl,
unsigned ASTContext::CountNonClassIvars(const ObjCInterfaceDecl *OI) {
unsigned count = 0;
// Count ivars declared in class extension.
- if (const ObjCCategoryDecl *CDecl = OI->getClassExtension())
+ for (const ObjCCategoryDecl *CDecl = OI->getFirstClassExtension(); CDecl;
+ CDecl = CDecl->getNextClassExtension())
count += CDecl->ivar_size();
// Count ivar defined in this class's implementation. This
OpenPOWER on IntegriCloud