blob: 89feb96d48e709f3e6bac5c7218dcbb8d4f7aeb5 [file] [log] [blame]
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +00001//===- CIndexHigh.cpp - Higher level API functions ------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "IndexingContext.h"
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +000011#include "clang/AST/DeclVisitor.h"
12
13using namespace clang;
14using namespace cxindex;
15
16namespace {
17
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +000018class IndexingDeclVisitor : public ConstDeclVisitor<IndexingDeclVisitor, bool> {
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +000019 IndexingContext &IndexCtx;
20
21public:
22 explicit IndexingDeclVisitor(IndexingContext &indexCtx)
23 : IndexCtx(indexCtx) { }
24
Argyrios Kyrtzidis55fb21e2013-05-29 23:58:31 +000025 /// \brief Returns true if the given method has been defined explicitly by the
26 /// user.
27 static bool hasUserDefined(const ObjCMethodDecl *D,
28 const ObjCImplDecl *Container) {
29 const ObjCMethodDecl *MD = Container->getMethod(D->getSelector(),
30 D->isInstanceMethod());
31 return MD && !MD->isImplicit() && MD->isThisDeclarationADefinition();
32 }
33
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +000034 void handleDeclarator(const DeclaratorDecl *D, const NamedDecl *Parent = 0) {
Argyrios Kyrtzidis25cb0ff2011-12-13 18:47:41 +000035 if (!Parent) Parent = D;
Argyrios Kyrtzidis9ef94862012-01-14 02:05:51 +000036
Argyrios Kyrtzidis7e747952012-02-14 22:23:11 +000037 if (!IndexCtx.shouldIndexFunctionLocalSymbols()) {
Argyrios Kyrtzidis9ef94862012-01-14 02:05:51 +000038 IndexCtx.indexTypeSourceInfo(D->getTypeSourceInfo(), Parent);
39 IndexCtx.indexNestedNameSpecifierLoc(D->getQualifierLoc(), Parent);
40 } else {
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +000041 if (const ParmVarDecl *Parm = dyn_cast<ParmVarDecl>(D)) {
Argyrios Kyrtzidis9ef94862012-01-14 02:05:51 +000042 IndexCtx.handleVar(Parm);
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +000043 } else if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
44 for (FunctionDecl::param_const_iterator PI = FD->param_begin(),
45 PE = FD->param_end();
46 PI != PE; ++PI) {
Argyrios Kyrtzidis9ef94862012-01-14 02:05:51 +000047 IndexCtx.handleVar(*PI);
48 }
49 }
50 }
Argyrios Kyrtzidis25cb0ff2011-12-13 18:47:41 +000051 }
52
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +000053 void handleObjCMethod(const ObjCMethodDecl *D) {
Argyrios Kyrtzidisceeb19c2012-02-28 17:50:28 +000054 IndexCtx.handleObjCMethod(D);
55 if (D->isImplicit())
56 return;
57
58 IndexCtx.indexTypeSourceInfo(D->getResultTypeSourceInfo(), D);
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +000059 for (ObjCMethodDecl::param_const_iterator I = D->param_begin(),
60 E = D->param_end();
61 I != E; ++I)
Argyrios Kyrtzidisceeb19c2012-02-28 17:50:28 +000062 handleDeclarator(*I, D);
63
64 if (D->isThisDeclarationADefinition()) {
65 const Stmt *Body = D->getBody();
66 if (Body) {
67 IndexCtx.indexBody(Body, D, D);
68 }
69 }
70 }
71
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +000072 bool VisitFunctionDecl(const FunctionDecl *D) {
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +000073 IndexCtx.handleFunction(D);
Argyrios Kyrtzidis25cb0ff2011-12-13 18:47:41 +000074 handleDeclarator(D);
Argyrios Kyrtzidis84bd1642012-01-23 16:58:36 +000075
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +000076 if (const CXXConstructorDecl *Ctor = dyn_cast<CXXConstructorDecl>(D)) {
Argyrios Kyrtzidis84bd1642012-01-23 16:58:36 +000077 // Constructor initializers.
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +000078 for (CXXConstructorDecl::init_const_iterator I = Ctor->init_begin(),
79 E = Ctor->init_end();
Argyrios Kyrtzidis84bd1642012-01-23 16:58:36 +000080 I != E; ++I) {
81 CXXCtorInitializer *Init = *I;
82 if (Init->isWritten()) {
83 IndexCtx.indexTypeSourceInfo(Init->getTypeSourceInfo(), D);
84 if (const FieldDecl *Member = Init->getAnyMember())
85 IndexCtx.handleReference(Member, Init->getMemberLocation(), D, D);
86 IndexCtx.indexBody(Init->getInit(), D, D);
87 }
88 }
89 }
90
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +000091 if (D->isThisDeclarationADefinition()) {
92 const Stmt *Body = D->getBody();
93 if (Body) {
Argyrios Kyrtzidis25cb0ff2011-12-13 18:47:41 +000094 IndexCtx.indexBody(Body, D, D);
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +000095 }
96 }
97 return true;
98 }
99
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000100 bool VisitVarDecl(const VarDecl *D) {
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000101 IndexCtx.handleVar(D);
Argyrios Kyrtzidis25cb0ff2011-12-13 18:47:41 +0000102 handleDeclarator(D);
103 IndexCtx.indexBody(D->getInit(), D);
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000104 return true;
105 }
106
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000107 bool VisitFieldDecl(const FieldDecl *D) {
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000108 IndexCtx.handleField(D);
Argyrios Kyrtzidis25cb0ff2011-12-13 18:47:41 +0000109 handleDeclarator(D);
110 if (D->isBitField())
111 IndexCtx.indexBody(D->getBitWidth(), D);
112 else if (D->hasInClassInitializer())
113 IndexCtx.indexBody(D->getInClassInitializer(), D);
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000114 return true;
115 }
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000116
John McCall5e77d762013-04-16 07:28:30 +0000117 bool VisitMSPropertyDecl(const MSPropertyDecl *D) {
118 handleDeclarator(D);
119 return true;
120 }
121
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000122 bool VisitEnumConstantDecl(const EnumConstantDecl *D) {
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000123 IndexCtx.handleEnumerator(D);
Argyrios Kyrtzidis25cb0ff2011-12-13 18:47:41 +0000124 IndexCtx.indexBody(D->getInitExpr(), D);
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000125 return true;
126 }
127
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000128 bool VisitTypedefNameDecl(const TypedefNameDecl *D) {
Argyrios Kyrtzidis4c910b12011-11-22 07:24:51 +0000129 IndexCtx.handleTypedefName(D);
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000130 IndexCtx.indexTypeSourceInfo(D->getTypeSourceInfo(), D);
131 return true;
132 }
133
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000134 bool VisitTagDecl(const TagDecl *D) {
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000135 // Non-free standing tags are handled in indexTypeSourceInfo.
136 if (D->isFreeStanding())
137 IndexCtx.indexTagDecl(D);
138 return true;
139 }
140
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000141 bool VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D) {
Argyrios Kyrtzidis7519c5e2011-11-11 00:23:36 +0000142 IndexCtx.handleObjCInterface(D);
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000143
Douglas Gregordeafd0b2011-12-27 22:43:10 +0000144 if (D->isThisDeclarationADefinition()) {
145 IndexCtx.indexTUDeclsInObjCContainer();
146 IndexCtx.indexDeclContext(D);
147 }
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000148 return true;
149 }
150
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000151 bool VisitObjCProtocolDecl(const ObjCProtocolDecl *D) {
Argyrios Kyrtzidis7519c5e2011-11-11 00:23:36 +0000152 IndexCtx.handleObjCProtocol(D);
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000153
Douglas Gregorf6102672012-01-01 21:23:57 +0000154 if (D->isThisDeclarationADefinition()) {
155 IndexCtx.indexTUDeclsInObjCContainer();
156 IndexCtx.indexDeclContext(D);
157 }
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000158 return true;
159 }
160
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000161 bool VisitObjCImplementationDecl(const ObjCImplementationDecl *D) {
Argyrios Kyrtzidis233f12d2011-11-15 06:20:24 +0000162 const ObjCInterfaceDecl *Class = D->getClassInterface();
Argyrios Kyrtzidis41fc05c2011-11-23 20:27:26 +0000163 if (!Class)
164 return true;
165
Argyrios Kyrtzidis233f12d2011-11-15 06:20:24 +0000166 if (Class->isImplicitInterfaceDecl())
167 IndexCtx.handleObjCInterface(Class);
168
Argyrios Kyrtzidis7519c5e2011-11-11 00:23:36 +0000169 IndexCtx.handleObjCImplementation(D);
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000170
171 IndexCtx.indexTUDeclsInObjCContainer();
Argyrios Kyrtzidis31afb952012-06-08 02:16:11 +0000172
173 // Index the ivars first to make sure the synthesized ivars are indexed
174 // before indexing the methods that can reference them.
175 for (ObjCImplementationDecl::ivar_iterator
176 IvarI = D->ivar_begin(),
177 IvarE = D->ivar_end(); IvarI != IvarE; ++IvarI) {
178 IndexCtx.indexDecl(*IvarI);
179 }
180 for (DeclContext::decl_iterator
181 I = D->decls_begin(), E = D->decls_end(); I != E; ++I) {
182 if (!isa<ObjCIvarDecl>(*I))
183 IndexCtx.indexDecl(*I);
184 }
185
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000186 return true;
187 }
188
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000189 bool VisitObjCCategoryDecl(const ObjCCategoryDecl *D) {
Argyrios Kyrtzidis7519c5e2011-11-11 00:23:36 +0000190 IndexCtx.handleObjCCategory(D);
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000191
192 IndexCtx.indexTUDeclsInObjCContainer();
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000193 IndexCtx.indexDeclContext(D);
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000194 return true;
195 }
196
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000197 bool VisitObjCCategoryImplDecl(const ObjCCategoryImplDecl *D) {
Argyrios Kyrtzidis41fc05c2011-11-23 20:27:26 +0000198 const ObjCCategoryDecl *Cat = D->getCategoryDecl();
199 if (!Cat)
Argyrios Kyrtzidis7519c5e2011-11-11 00:23:36 +0000200 return true;
201
202 IndexCtx.handleObjCCategoryImpl(D);
203
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000204 IndexCtx.indexTUDeclsInObjCContainer();
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000205 IndexCtx.indexDeclContext(D);
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000206 return true;
207 }
208
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000209 bool VisitObjCMethodDecl(const ObjCMethodDecl *D) {
Argyrios Kyrtzidisceeb19c2012-02-28 17:50:28 +0000210 // Methods associated with a property, even user-declared ones, are
211 // handled when we handle the property.
Jordan Rosed01e83a2012-10-10 16:42:25 +0000212 if (D->isPropertyAccessor())
Argyrios Kyrtzidisceeb19c2012-02-28 17:50:28 +0000213 return true;
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000214
Argyrios Kyrtzidisceeb19c2012-02-28 17:50:28 +0000215 handleObjCMethod(D);
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000216 return true;
217 }
218
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000219 bool VisitObjCPropertyDecl(const ObjCPropertyDecl *D) {
Argyrios Kyrtzidisceeb19c2012-02-28 17:50:28 +0000220 if (ObjCMethodDecl *MD = D->getGetterMethodDecl())
221 if (MD->getLexicalDeclContext() == D->getLexicalDeclContext())
222 handleObjCMethod(MD);
223 if (ObjCMethodDecl *MD = D->getSetterMethodDecl())
224 if (MD->getLexicalDeclContext() == D->getLexicalDeclContext())
225 handleObjCMethod(MD);
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000226 IndexCtx.handleObjCProperty(D);
227 IndexCtx.indexTypeSourceInfo(D->getTypeSourceInfo(), D);
228 return true;
229 }
Argyrios Kyrtzidiseffdbf52011-11-18 00:26:51 +0000230
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000231 bool VisitObjCPropertyImplDecl(const ObjCPropertyImplDecl *D) {
Argyrios Kyrtzidiseffdbf52011-11-18 00:26:51 +0000232 ObjCPropertyDecl *PD = D->getPropertyDecl();
233 IndexCtx.handleSynthesizedObjCProperty(D);
234
235 if (D->getPropertyImplementation() == ObjCPropertyImplDecl::Dynamic)
236 return true;
237 assert(D->getPropertyImplementation() == ObjCPropertyImplDecl::Synthesize);
238
239 if (ObjCIvarDecl *IvarD = D->getPropertyIvarDecl()) {
240 if (!IvarD->getSynthesize())
241 IndexCtx.handleReference(IvarD, D->getPropertyIvarDeclLoc(), 0,
242 D->getDeclContext());
243 }
244
245 if (ObjCMethodDecl *MD = PD->getGetterMethodDecl()) {
Argyrios Kyrtzidis55fb21e2013-05-29 23:58:31 +0000246 if (MD->isPropertyAccessor() &&
247 !hasUserDefined(MD, cast<ObjCImplDecl>(D->getDeclContext())))
Argyrios Kyrtzidis34608802012-02-28 17:50:39 +0000248 IndexCtx.handleSynthesizedObjCMethod(MD, D->getLocation(),
249 D->getLexicalDeclContext());
Argyrios Kyrtzidiseffdbf52011-11-18 00:26:51 +0000250 }
251 if (ObjCMethodDecl *MD = PD->getSetterMethodDecl()) {
Argyrios Kyrtzidis55fb21e2013-05-29 23:58:31 +0000252 if (MD->isPropertyAccessor() &&
253 !hasUserDefined(MD, cast<ObjCImplDecl>(D->getDeclContext())))
Argyrios Kyrtzidis34608802012-02-28 17:50:39 +0000254 IndexCtx.handleSynthesizedObjCMethod(MD, D->getLocation(),
255 D->getLexicalDeclContext());
Argyrios Kyrtzidiseffdbf52011-11-18 00:26:51 +0000256 }
Argyrios Kyrtzidis4c910b12011-11-22 07:24:51 +0000257 return true;
258 }
Argyrios Kyrtzidiseffdbf52011-11-18 00:26:51 +0000259
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000260 bool VisitNamespaceDecl(const NamespaceDecl *D) {
Argyrios Kyrtzidis2b0b43c2011-12-07 05:52:06 +0000261 IndexCtx.handleNamespace(D);
262 IndexCtx.indexDeclContext(D);
263 return true;
264 }
265
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000266 bool VisitUsingDecl(const UsingDecl *D) {
Argyrios Kyrtzidis4701cf62012-02-10 20:10:48 +0000267 // FIXME: Parent for the following is CXIdxEntity_Unexposed with no USR,
268 // we should do better.
269
270 IndexCtx.indexNestedNameSpecifierLoc(D->getQualifierLoc(), D);
271 for (UsingDecl::shadow_iterator
272 I = D->shadow_begin(), E = D->shadow_end(); I != E; ++I) {
273 IndexCtx.handleReference((*I)->getUnderlyingDecl(), D->getLocation(),
274 D, D->getLexicalDeclContext());
275 }
276 return true;
277 }
278
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000279 bool VisitUsingDirectiveDecl(const UsingDirectiveDecl *D) {
Argyrios Kyrtzidis4701cf62012-02-10 20:10:48 +0000280 // FIXME: Parent for the following is CXIdxEntity_Unexposed with no USR,
281 // we should do better.
282
283 IndexCtx.indexNestedNameSpecifierLoc(D->getQualifierLoc(), D);
284 IndexCtx.handleReference(D->getNominatedNamespaceAsWritten(),
285 D->getLocation(), D, D->getLexicalDeclContext());
286 return true;
287 }
288
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000289 bool VisitClassTemplateDecl(const ClassTemplateDecl *D) {
Argyrios Kyrtzidis4c910b12011-11-22 07:24:51 +0000290 IndexCtx.handleClassTemplate(D);
291 if (D->isThisDeclarationADefinition())
292 IndexCtx.indexDeclContext(D->getTemplatedDecl());
293 return true;
294 }
295
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000296 bool VisitClassTemplateSpecializationDecl(const
Argyrios Kyrtzidise5dc5b32012-02-10 20:10:44 +0000297 ClassTemplateSpecializationDecl *D) {
Argyrios Kyrtzidis7e747952012-02-14 22:23:11 +0000298 // FIXME: Notify subsequent callbacks if info comes from implicit
Argyrios Kyrtzidise5dc5b32012-02-10 20:10:44 +0000299 // instantiation.
Argyrios Kyrtzidis7e747952012-02-14 22:23:11 +0000300 if (D->isThisDeclarationADefinition() &&
301 (IndexCtx.shouldIndexImplicitTemplateInsts() ||
302 !IndexCtx.isTemplateImplicitInstantiation(D)))
Argyrios Kyrtzidise5dc5b32012-02-10 20:10:44 +0000303 IndexCtx.indexTagDecl(D);
304 return true;
305 }
306
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000307 bool VisitFunctionTemplateDecl(const FunctionTemplateDecl *D) {
Argyrios Kyrtzidis4c910b12011-11-22 07:24:51 +0000308 IndexCtx.handleFunctionTemplate(D);
309 FunctionDecl *FD = D->getTemplatedDecl();
Argyrios Kyrtzidis25cb0ff2011-12-13 18:47:41 +0000310 handleDeclarator(FD, D);
Argyrios Kyrtzidis4c910b12011-11-22 07:24:51 +0000311 if (FD->isThisDeclarationADefinition()) {
312 const Stmt *Body = FD->getBody();
313 if (Body) {
Argyrios Kyrtzidis25cb0ff2011-12-13 18:47:41 +0000314 IndexCtx.indexBody(Body, D, FD);
Argyrios Kyrtzidis4c910b12011-11-22 07:24:51 +0000315 }
316 }
317 return true;
318 }
319
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000320 bool VisitTypeAliasTemplateDecl(const TypeAliasTemplateDecl *D) {
Argyrios Kyrtzidis4c910b12011-11-22 07:24:51 +0000321 IndexCtx.handleTypeAliasTemplate(D);
322 IndexCtx.indexTypeSourceInfo(D->getTemplatedDecl()->getTypeSourceInfo(), D);
Argyrios Kyrtzidiseffdbf52011-11-18 00:26:51 +0000323 return true;
324 }
Argyrios Kyrtzidis472eda02012-10-02 16:10:38 +0000325
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000326 bool VisitImportDecl(const ImportDecl *D) {
Argyrios Kyrtzidis184b1442012-10-03 21:05:44 +0000327 IndexCtx.importedModule(D);
Argyrios Kyrtzidis472eda02012-10-02 16:10:38 +0000328 return true;
329 }
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000330};
331
332} // anonymous namespace
333
334void IndexingContext::indexDecl(const Decl *D) {
Argyrios Kyrtzidisea9b81b2012-02-07 22:46:16 +0000335 if (D->isImplicit() && shouldIgnoreIfImplicit(D))
336 return;
337
Dmitri Gribenkobf7bf102013-02-03 13:42:20 +0000338 bool Handled = IndexingDeclVisitor(*this).Visit(D);
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000339 if (!Handled && isa<DeclContext>(D))
340 indexDeclContext(cast<DeclContext>(D));
341}
342
343void IndexingContext::indexDeclContext(const DeclContext *DC) {
344 for (DeclContext::decl_iterator
345 I = DC->decls_begin(), E = DC->decls_end(); I != E; ++I) {
346 indexDecl(*I);
347 }
348}
349
Argyrios Kyrtzidis68e87e12012-09-10 22:58:04 +0000350void IndexingContext::indexTopLevelDecl(const Decl *D) {
Argyrios Kyrtzidisd992e142011-11-15 06:20:16 +0000351 if (isNotFromSourceFile(D->getLocation()))
352 return;
353
354 if (isa<ObjCMethodDecl>(D))
355 return; // Wait for the objc container.
356
357 indexDecl(D);
358}
359
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000360void IndexingContext::indexDeclGroupRef(DeclGroupRef DG) {
Argyrios Kyrtzidisd992e142011-11-15 06:20:16 +0000361 for (DeclGroupRef::iterator I = DG.begin(), E = DG.end(); I != E; ++I)
362 indexTopLevelDecl(*I);
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000363}
364
365void IndexingContext::indexTUDeclsInObjCContainer() {
Argyrios Kyrtzidisaaf97432012-03-23 23:24:18 +0000366 while (!TUDeclsInObjCContainer.empty()) {
367 DeclGroupRef DG = TUDeclsInObjCContainer.front();
368 TUDeclsInObjCContainer.pop_front();
369 indexDeclGroupRef(DG);
370 }
Argyrios Kyrtzidisdc199a32011-10-17 19:48:19 +0000371}