diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-09-01 01:21:15 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-09-01 01:21:15 +0000 |
commit | 0ef508d3019ce87f78faba036986be490a89dd33 (patch) | |
tree | 48d1eb6db9c59dc2a9e155d60abfc0a4fc35f465 /clang/lib/Sema/SemaCodeComplete.cpp | |
parent | 6961e87847cd39a65ecde0342ec5c7d1dee9622c (diff) | |
download | bcm5719-llvm-0ef508d3019ce87f78faba036986be490a89dd33.tar.gz bcm5719-llvm-0ef508d3019ce87f78faba036986be490a89dd33.zip |
Split ObjCInterfaceDecl::ReferencedProtocols into two lists: ReferencedProtocols and AllReferencedProtocols. ReferencedProtocols
(and thus protocol_begin(), protocol_end()) now only contains the list of protocols that were directly referenced in
an @interface declaration. 'all_referenced_protocol_[begin,end]()' now returns the set of protocols that were referenced
in both the @interface and class extensions. The latter is needed for semantic analysis/codegen, while the former is
needed to maintain the lexical information of the original source.
Fixes <rdar://problem/8380046>.
llvm-svn: 112691
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r-- | clang/lib/Sema/SemaCodeComplete.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp index cef3546cc10..7088e55304f 100644 --- a/clang/lib/Sema/SemaCodeComplete.cpp +++ b/clang/lib/Sema/SemaCodeComplete.cpp @@ -2686,9 +2686,9 @@ static void AddObjCProperties(ObjCContainerDecl *Container, } // Look through protocols. - for (ObjCInterfaceDecl::protocol_iterator I = IFace->protocol_begin(), - E = IFace->protocol_end(); - I != E; ++I) + for (ObjCInterfaceDecl::all_protocol_iterator + I = IFace->all_referenced_protocol_begin(), + E = IFace->all_referenced_protocol_end(); I != E; ++I) AddObjCProperties(*I, AllowCategories, CurContext, Results); // Look in the superclass. @@ -2698,8 +2698,8 @@ static void AddObjCProperties(ObjCContainerDecl *Container, } else if (const ObjCCategoryDecl *Category = dyn_cast<ObjCCategoryDecl>(Container)) { // Look through protocols. - for (ObjCInterfaceDecl::protocol_iterator P = Category->protocol_begin(), - PEnd = Category->protocol_end(); + for (ObjCCategoryDecl::protocol_iterator P = Category->protocol_begin(), + PEnd = Category->protocol_end(); P != PEnd; ++P) AddObjCProperties(*P, AllowCategories, CurContext, Results); } |