From f9f8429c74995e048d5e2fc5b27070122bf12628 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 7 Mar 2018 15:08:50 -0800 Subject: [PATCH] Uniquify {func,type}.derived --- src/clang_indexer.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/clang_indexer.cc b/src/clang_indexer.cc index b4361a6d..df82f242 100644 --- a/src/clang_indexer.cc +++ b/src/clang_indexer.cc @@ -2264,9 +2264,13 @@ optional>> ParseWithTu( for (std::unique_ptr& 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);