From f2d46e86b7929318c4fdd324473bab6c66de4a45 Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Tue, 16 May 2017 23:09:53 -0700 Subject: [PATCH] Don't force index updates on primary translation unit when updating dependency indexes. --- src/indexer.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/indexer.cc b/src/indexer.cc index 91212290..6045828a 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -1414,10 +1414,9 @@ std::vector> Parse( FileConsumer file_consumer(file_consumer_shared); IndexParam param(&file_consumer); - // TODO: There is no real reason why we need |ForceLocal|. Remove it when we - // have argument guessing. CXFile cx_file = clang_getFile(tu.cx_tu, file.c_str()); - param.primary_file = file_consumer.ForceLocal(cx_file); + bool is_first_ownership; + param.primary_file = file_consumer.TryConsumeFile(cx_file, &is_first_ownership); std::cerr << "!! [START] Indexing " << file << std::endl; CXIndexAction index_action = clang_IndexAction_create(index.cx_index);