summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclBase.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-08-27 20:50:59 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-08-27 20:50:59 +0000
commit3a039e339f1fc8a134b1d55cd6c4c6d387a81967 (patch)
treeabcdea7eb4975061cca240f4a8b44364018babc7 /clang/lib/AST/DeclBase.cpp
parente83797c3aa94201e89873a5108ebeb6c31d118e5 (diff)
downloadbcm5719-llvm-3a039e339f1fc8a134b1d55cd6c4c6d387a81967.tar.gz
bcm5719-llvm-3a039e339f1fc8a134b1d55cd6c4c6d387a81967.zip
objective-c: Treat top-level objective-c declarations
, such as list of forward @class decls, in a DeclGroup node. Deal with its consequence throught clang. This is in preparation for more Sema work ahead. // rdar://8843851. Feel free to reverse if it breaks something important and I am unavailable. llvm-svn: 138709
Diffstat (limited to 'clang/lib/AST/DeclBase.cpp')
-rw-r--r--clang/lib/AST/DeclBase.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp
index cb5846fc838..27e437c4a3e 100644
--- a/clang/lib/AST/DeclBase.cpp
+++ b/clang/lib/AST/DeclBase.cpp
@@ -1030,12 +1030,10 @@ void DeclContext::buildLookup(DeclContext *DCtx) {
if (D->getDeclContext() == DCtx)
makeDeclVisibleInContextImpl(ND);
- // Insert any forward-declared Objective-C interfaces into the lookup
+ // Insert any forward-declared Objective-C interface into the lookup
// data structure.
if (ObjCClassDecl *Class = dyn_cast<ObjCClassDecl>(*D))
- for (ObjCClassDecl::iterator I = Class->begin(), IEnd = Class->end();
- I != IEnd; ++I)
- makeDeclVisibleInContextImpl(I->getInterface());
+ makeDeclVisibleInContextImpl(Class->getForwardInterfaceDecl());
// If this declaration is itself a transparent declaration context or
// inline namespace, add its members (recursively).
OpenPOWER on IntegriCloud