Uniquify {func,type}.derived

This commit is contained in:
Fangrui Song 2018-03-07 15:08:50 -08:00
parent 478e542e8a
commit f9f8429c74

View File

@ -2264,9 +2264,13 @@ optional<std::vector<std::unique_ptr<IndexFile>>> ParseWithTu(
for (std::unique_ptr<IndexFile>& entry : result) {
entry->import_file = file;
entry->args = args;
for (IndexFunc& func : entry->funcs)
for (IndexFunc& func : entry->funcs) {
// e.g. declaration + out-of-line definition
Uniquify(func.derived);
Uniquify(func.uses);
}
for (IndexType& type : entry->types) {
Uniquify(type.derived);
Uniquify(type.uses);
// e.g. declaration + out-of-line definition
Uniquify(type.def.funcs);