mirror of
https://github.com/MaskRay/ccls.git
synced 2025-02-07 17:32:14 +00:00
Do not import empty dependencies
This commit is contained in:
parent
3ab4d0455d
commit
7faedfdf00
@ -120,7 +120,9 @@ IndexFile* ConsumeFile(IndexParam* param, CXFile file) {
|
|||||||
// generating an index for it):
|
// generating an index for it):
|
||||||
if (param->seen_cx_files.insert(file).second) {
|
if (param->seen_cx_files.insert(file).second) {
|
||||||
std::string file_name = FileName(file);
|
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
|
// Add to all files we have seen so we can generate proper dependency
|
||||||
// graph.
|
// graph.
|
||||||
param->seen_files.push_back(file_name);
|
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;
|
LOG_S(ERROR) << "[indexer] Failed to read file content for " << file_name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (is_first_ownership) {
|
if (is_first_ownership) {
|
||||||
// Report skipped source range list.
|
// Report skipped source range list.
|
||||||
|
Loading…
Reference in New Issue
Block a user