mirror of
https://github.com/MaskRay/ccls.git
synced 2025-02-21 16:09:40 +00:00
index stl declarations
This commit is contained in:
parent
abbc6380f4
commit
94090b7b50
@ -8,6 +8,8 @@
|
||||
|
||||
namespace {
|
||||
|
||||
const bool kIndexStdDeclarations = true;
|
||||
|
||||
void AddFuncRef(std::vector<IndexFuncRef>* 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));
|
||||
|
Loading…
Reference in New Issue
Block a user