Do not import empty dependencies

This commit is contained in:
Jacob Dufault 2017-08-15 20:28:52 -07:00
parent 3ab4d0455d
commit 7faedfdf00

View File

@ -120,7 +120,9 @@ IndexFile* ConsumeFile(IndexParam* param, CXFile file) {
// generating an index for it):
if (param->seen_cx_files.insert(file).second) {
std::string file_name = FileName(file);
// Sometimes the fill name will be empty. Not sure why. Not much we can do
// with it.
if (!file_name.empty()) {
// Add to all files we have seen so we can generate proper dependency
// graph.
param->seen_files.push_back(file_name);
@ -138,6 +140,7 @@ IndexFile* ConsumeFile(IndexParam* param, CXFile file) {
LOG_S(ERROR) << "[indexer] Failed to read file content for " << file_name;
}
}
}
if (is_first_ownership) {
// Report skipped source range list.