mirror of
https://github.com/MaskRay/ccls.git
synced 2025-03-30 13:32:13 +00:00
Add todo; use clang_parseTranslationUnit2
This commit is contained in:
parent
629876007e
commit
ea5400a633
@ -25,7 +25,8 @@ TranslationUnit::TranslationUnit(Index& index,
|
|||||||
|
|
||||||
std::cerr << "Parsing " << filepath << " with args " << StringJoin(args) << std::endl;
|
std::cerr << "Parsing " << filepath << " with args " << StringJoin(args) << std::endl;
|
||||||
|
|
||||||
CXErrorCode error_code = clang_parseTranslationUnit2FullArgv(
|
//CXErrorCode error_code = clang_parseTranslationUnit2FullArgv(
|
||||||
|
CXErrorCode error_code = clang_parseTranslationUnit2(
|
||||||
index.cx_index, filepath.c_str(), args.data(), args.size(),
|
index.cx_index, filepath.c_str(), args.data(), args.size(),
|
||||||
unsaved_files.data(), unsaved_files.size(), flags, &cx_tu);
|
unsaved_files.data(), unsaved_files.size(), flags, &cx_tu);
|
||||||
|
|
||||||
@ -88,4 +89,4 @@ void TranslationUnit::ReparseTranslationUnit(
|
|||||||
Cursor TranslationUnit::document_cursor() const {
|
Cursor TranslationUnit::document_cursor() const {
|
||||||
return Cursor(clang_getTranslationUnitCursor(cx_tu));
|
return Cursor(clang_getTranslationUnitCursor(cx_tu));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -251,6 +251,7 @@ struct QueryDatabase {
|
|||||||
std::vector<optional<QueryVar>> vars;
|
std::vector<optional<QueryVar>> vars;
|
||||||
|
|
||||||
// Lookup symbol based on a usr.
|
// Lookup symbol based on a usr.
|
||||||
|
// TODO: consider splitting this into type/func/var
|
||||||
spp::sparse_hash_map<Usr, SymbolIdx> usr_to_symbol;
|
spp::sparse_hash_map<Usr, SymbolIdx> usr_to_symbol;
|
||||||
|
|
||||||
// Marks the given Usrs as invalid.
|
// Marks the given Usrs as invalid.
|
||||||
|
Loading…
Reference in New Issue
Block a user