MCPcopy Create free account
hub / github.com/MaskRay/ccls / operator<

Method operator<

src/message_handler.cc:105–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103 Role role;
104 CclsSemanticHighlightSymbol *symbol;
105 bool operator<(const ScanLineEvent &o) const {
106 // See the comments below when insertion/deletion events are inserted.
107 if (!(pos == o.pos))
108 return pos < o.pos;
109 if (!(o.end_pos == end_pos))
110 return o.end_pos < end_pos;
111 // This comparison essentially order Macro after non-Macro,
112 // So that macros will not be rendered as Var/Type/...
113 if (symbol->kind != o.symbol->kind)
114 return symbol->kind < o.symbol->kind;
115 // If symbol A and B occupy the same place, we want one to be placed
116 // before the other consistantly.
117 return symbol->id < o.symbol->id;
118 }
119};
120} // namespace
121

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected