This commit is contained in:
Fangrui Song 2018-01-29 19:08:19 -08:00
parent 0eb7d415d7
commit 5bd466ab17

View File

@ -188,7 +188,7 @@ std::vector<QueryLocation> GetUsesOfSymbol(QueryDatabase* db,
case SymbolKind::Type: {
QueryType& type = db->types[symbol.idx];
std::vector<QueryLocation> ret = type.uses;
if (include_decl && type.def)
if (include_decl && type.def && type.def->definition_spelling)
ret.push_back(*type.def->definition_spelling);
return ret;
}