Revert change to use CXTranslationUnit_Incomplete when indexing. It broke tests.

This commit is contained in:
Jacob Dufault 2017-05-24 20:06:05 -07:00
parent 32940e2c88
commit 8bbd9b7694
3 changed files with 4 additions and 6 deletions

View File

@ -2955,12 +2955,12 @@ int main(int argc, char** argv) {
if (context.shouldExit())
return res;
for (int i = 0; i < 50; ++i)
for (int i = 0; i < 1; ++i)
RunTests();
for (int i = 0; i < 20; ++i) {
for (int i = 0; i < 1; ++i) {
std::this_thread::sleep_for(std::chrono::seconds(5));
std::cerr << "[POST] " << GetProcessMemoryUsedInMb() << std::endl;
std::cerr << "[POST] Memory usage: " << GetProcessMemoryUsedInMb() << "mb" << std::endl;
}
std::cerr << std::endl << "[Enter] to exit" << std::endl;

View File

@ -1557,7 +1557,7 @@ std::vector<std::unique_ptr<IndexFile>> Parse(
unsaved.Length = (unsigned long)file_contents->size();
unsaved_files.push_back(unsaved);
}
clang::TranslationUnit tu(index, file, args, unsaved_files, CXTranslationUnit_KeepGoing | CXTranslationUnit_DetailedPreprocessingRecord | CXTranslationUnit_Incomplete);
clang::TranslationUnit tu(index, file, args, unsaved_files, CXTranslationUnit_KeepGoing | CXTranslationUnit_DetailedPreprocessingRecord);
perf->index_parse = timer.ElapsedMicrosecondsAndReset();

View File

@ -138,7 +138,6 @@ void RunTests() {
&index,
false /*dump_ast*/);
#if false
// Parse expected output from the test, parse it into JSON document.
std::unordered_map<std::string, std::string> all_expected_output = ParseTestExpectation(path);
for (auto& entry : all_expected_output) {
@ -183,7 +182,6 @@ void RunTests() {
}
}
#endif
memory_after = GetProcessMemoryUsedInMb();
}