Add todo; use clang_parseTranslationUnit2

This commit is contained in:
Jacob Dufault 2017-05-08 18:21:21 -07:00
parent 629876007e
commit ea5400a633
2 changed files with 4 additions and 2 deletions

View File

@ -25,7 +25,8 @@ TranslationUnit::TranslationUnit(Index& index,
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(),
unsaved_files.data(), unsaved_files.size(), flags, &cx_tu);

View File

@ -251,6 +251,7 @@ struct QueryDatabase {
std::vector<optional<QueryVar>> vars;
// Lookup symbol based on a usr.
// TODO: consider splitting this into type/func/var
spp::sparse_hash_map<Usr, SymbolIdx> usr_to_symbol;
// Marks the given Usrs as invalid.