mirror of
https://github.com/MaskRay/ccls.git
synced 2025-03-21 16:26:16 +00:00
Remove TranslationUnit::document_cursor()
This commit is contained in:
parent
7d549f3fdf
commit
6d2af96c16
@ -1468,7 +1468,7 @@ std::vector<std::unique_ptr<IndexFile>> Parse(
|
|||||||
perf->index_parse = timer.ElapsedMicrosecondsAndReset();
|
perf->index_parse = timer.ElapsedMicrosecondsAndReset();
|
||||||
|
|
||||||
if (dump_ast)
|
if (dump_ast)
|
||||||
Dump(tu->document_cursor());
|
Dump(clang_getTranslationUnitCursor(tu->cx_tu));
|
||||||
|
|
||||||
return ParseWithTu(file_consumer_shared, perf, tu.get(), index, file, args,
|
return ParseWithTu(file_consumer_shared, perf, tu.get(), index, file, args,
|
||||||
unsaved_files);
|
unsaved_files);
|
||||||
@ -1510,8 +1510,8 @@ std::vector<std::unique_ptr<IndexFile>> ParseWithTu(
|
|||||||
clang_IndexAction_dispose(index_action);
|
clang_IndexAction_dispose(index_action);
|
||||||
// std::cerr << "!! [END] Indexing " << file << std::endl;
|
// std::cerr << "!! [END] Indexing " << file << std::endl;
|
||||||
|
|
||||||
tu->document_cursor().VisitChildren(&VisitMacroDefinitionAndExpansions,
|
clang::Cursor(clang_getTranslationUnitCursor(tu->cx_tu))
|
||||||
¶m);
|
.VisitChildren(&VisitMacroDefinitionAndExpansions, ¶m);
|
||||||
|
|
||||||
perf->index_build = timer.ElapsedMicrosecondsAndReset();
|
perf->index_build = timer.ElapsedMicrosecondsAndReset();
|
||||||
|
|
||||||
|
@ -89,7 +89,4 @@ TranslationUnit::~TranslationUnit() {
|
|||||||
clang_disposeTranslationUnit(cx_tu);
|
clang_disposeTranslationUnit(cx_tu);
|
||||||
}
|
}
|
||||||
|
|
||||||
Cursor TranslationUnit::document_cursor() const {
|
|
||||||
return Cursor(clang_getTranslationUnitCursor(cx_tu));
|
|
||||||
}
|
|
||||||
} // namespace clang
|
} // namespace clang
|
||||||
|
@ -27,8 +27,6 @@ class TranslationUnit {
|
|||||||
explicit TranslationUnit(CXTranslationUnit tu);
|
explicit TranslationUnit(CXTranslationUnit tu);
|
||||||
~TranslationUnit();
|
~TranslationUnit();
|
||||||
|
|
||||||
Cursor document_cursor() const;
|
|
||||||
|
|
||||||
CXTranslationUnit cx_tu;
|
CXTranslationUnit cx_tu;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -429,9 +429,6 @@ IndexUpdate::IndexUpdate(const IdMap& previous_id_map,
|
|||||||
bool did_add = \
|
bool did_add = \
|
||||||
ComputeDifferenceForUpdate(previous, current, &removed, &added); \
|
ComputeDifferenceForUpdate(previous, current, &removed, &added); \
|
||||||
if (did_add) { \
|
if (did_add) { \
|
||||||
/*std::cerr << "Adding mergeable update on " << \ \ \ \ \ \ \
|
|
||||||
* current_def->def.short_name << " (" << current_def->def.usr << ") for \
|
|
||||||
* \ \ \ \ \ \ field " << #index_name << std::endl;*/ \
|
|
||||||
query_name.push_back(MergeableUpdate<type_id, type>( \
|
query_name.push_back(MergeableUpdate<type_id, type>( \
|
||||||
current_id_map.ToQuery(current_def->id), added, removed)); \
|
current_id_map.ToQuery(current_def->id), added, removed)); \
|
||||||
} \
|
} \
|
||||||
|
Loading…
Reference in New Issue
Block a user