aboutsummaryrefslogtreecommitdiff
path: root/tools/libclang/IndexDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/libclang/IndexDecl.cpp')
-rw-r--r--tools/libclang/IndexDecl.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/libclang/IndexDecl.cpp b/tools/libclang/IndexDecl.cpp
index 3f2c8b5710..c257c342aa 100644
--- a/tools/libclang/IndexDecl.cpp
+++ b/tools/libclang/IndexDecl.cpp
@@ -328,7 +328,9 @@ void IndexingContext::indexDeclGroupRef(DeclGroupRef DG) {
}
void IndexingContext::indexTUDeclsInObjCContainer() {
- for (unsigned i = 0, e = TUDeclsInObjCContainer.size(); i != e; ++i)
- indexDeclGroupRef(TUDeclsInObjCContainer[i]);
- TUDeclsInObjCContainer.clear();
+ while (!TUDeclsInObjCContainer.empty()) {
+ DeclGroupRef DG = TUDeclsInObjCContainer.front();
+ TUDeclsInObjCContainer.pop_front();
+ indexDeclGroupRef(DG);
+ }
}