diff --git a/src/indexer.cc b/src/indexer.cc index 3d52d0c8..9c9af9a1 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -1540,11 +1540,6 @@ void OnIndexDeclaration(CXClientData client_data, const CXIdxDeclInfo* decl) { if (!is_template_specialization) { func->def.short_name = decl->entityInfo->name; - // Set the |is_operator| flag to true if the function name starts with - // "operator" - func->def.is_operator = - func->def.short_name.compare(0, 8, "operator") == 0; - // Build detailed name. The type desc looks like void (void *). We // insert the qualified name before the first '('. func->def.detailed_name = GetFunctionSignature(db, ns, decl); diff --git a/src/indexer.h b/src/indexer.h index 59e87d4a..48cb8384 100644 --- a/src/indexer.h +++ b/src/indexer.h @@ -271,9 +271,6 @@ struct FuncDefDefinitionData { // Functions that this function calls. std::vector callees; - // Used for semantic highlighting - bool is_operator = false; - bool operator==( const FuncDefDefinitionData& other) const { @@ -314,7 +311,6 @@ void Reflect( REFLECT_MEMBER(base); REFLECT_MEMBER(locals); REFLECT_MEMBER(callees); - REFLECT_MEMBER(is_operator); REFLECT_MEMBER_END(); } diff --git a/src/message_handler.cc b/src/message_handler.cc index a32fb9a8..fe458a14 100644 --- a/src/message_handler.cc +++ b/src/message_handler.cc @@ -134,7 +134,7 @@ void EmitSemanticHighlighting(QueryDatabase* db, QueryFunc* func = &db->funcs[sym.idx.idx]; if (!func->def) continue; // applies to for loop - if (func->def->is_operator) + if (func->def->short_name.compare(0, 8, "operator") == 0) continue; // applies to for loop kind = func->def->kind; is_type_member = func->def->declaring_type.has_value(); diff --git a/src/query.cc b/src/query.cc index bdade8b7..d6794691 100644 --- a/src/query.cc +++ b/src/query.cc @@ -69,7 +69,6 @@ optional ToQuery(const IdMap& id_map, result.base = id_map.ToQuery(func.base); result.locals = id_map.ToQuery(func.locals); result.callees = id_map.ToQuery(func.callees); - result.is_operator = func.is_operator; return result; } diff --git a/src/serializer.cc b/src/serializer.cc index b68b2f96..44c6a924 100644 --- a/src/serializer.cc +++ b/src/serializer.cc @@ -159,7 +159,6 @@ template void Reflect(TVisitor& visitor, IndexFunc& value) { REFLECT_MEMBER_START(); REFLECT_MEMBER2("id", value.id); - REFLECT_MEMBER2("is_operator", value.def.is_operator); REFLECT_MEMBER2("usr", value.usr); REFLECT_MEMBER2("short_name", value.def.short_name); REFLECT_MEMBER2("detailed_name", value.def.detailed_name);