summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/libclang/IndexDecl.cpp8
-rw-r--r--tools/libclang/IndexingContext.h3
2 files changed, 7 insertions, 4 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);
+ }
}
diff --git a/tools/libclang/IndexingContext.h b/tools/libclang/IndexingContext.h
index d828b17ca5..93d4718e27 100644
--- a/tools/libclang/IndexingContext.h
+++ b/tools/libclang/IndexingContext.h
@@ -13,6 +13,7 @@
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclGroup.h"
#include "llvm/ADT/DenseSet.h"
+#include <deque>
namespace clang {
class FileEntry;
@@ -285,7 +286,7 @@ class IndexingContext {
llvm::DenseSet<RefFileOccurence> RefFileOccurences;
- SmallVector<DeclGroupRef, 8> TUDeclsInObjCContainer;
+ std::deque<DeclGroupRef> TUDeclsInObjCContainer;
llvm::BumpPtrAllocator StrScratch;
unsigned StrAdapterCount;