From 94090b7b509e3dd7b6ff33b4a1a5b5774615e63a Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Wed, 12 Apr 2017 00:57:12 -0700 Subject: [PATCH] index stl declarations --- src/indexer.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/indexer.cc b/src/indexer.cc index 8ee9124f..7350294f 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -8,6 +8,8 @@ namespace { +const bool kIndexStdDeclarations = true; + void AddFuncRef(std::vector* result, IndexFuncRef ref) { if (!result->empty() && (*result)[result->size() - 1] == ref) return; @@ -710,7 +712,7 @@ bool AreEqualLocations(CXIdxLoc loc, CXCursor cursor) { void indexDeclaration(CXClientData client_data, const CXIdxDeclInfo* decl) { // TODO: allow user to configure if they want STL index. - if (clang_Location_isInSystemHeader(clang_indexLoc_getCXSourceLocation(decl->loc))) + if (!kIndexStdDeclarations && clang_Location_isInSystemHeader(clang_indexLoc_getCXSourceLocation(decl->loc))) return; assert(AreEqualLocations(decl->loc, decl->cursor));