mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-22 15:45:08 +00:00
Formatting and a TODO
This commit is contained in:
parent
eea8a1b07a
commit
6a50c48aaa
@ -124,6 +124,8 @@ Project::Entry GetCompilationEntryFromCompileCommandEntry(
|
||||
}
|
||||
|
||||
auto cleanup_maybe_relative_path = [&](const std::string& path) {
|
||||
// TODO/FIXME: Normalization will fail for paths that do not exist. Should
|
||||
// it return an optional<std::string>?
|
||||
assert(!path.empty());
|
||||
if (path[0] == '/' || entry.directory.empty())
|
||||
return NormalizePathWithTestOptOut(path);
|
||||
|
@ -603,7 +603,7 @@ IndexUpdate::IndexUpdate(const IdMap& previous_id_map,
|
||||
}
|
||||
|
||||
void IndexUpdate::Merge(const IndexUpdate& update) {
|
||||
// This function runs on an indexer thread.
|
||||
// This function runs on an indexer thread.
|
||||
|
||||
#define INDEX_UPDATE_APPEND(name) AddRange(&name, update.name);
|
||||
#define INDEX_UPDATE_MERGE(name) AddMergeableRange(&name, update.name);
|
||||
|
@ -55,13 +55,13 @@ enum class SymbolKind : int { Invalid, File, Type, Func, Var };
|
||||
MAKE_REFLECT_TYPE_PROXY(SymbolKind, int);
|
||||
|
||||
namespace std {
|
||||
template <> struct hash<::SymbolKind> {
|
||||
size_t operator()(const ::SymbolKind &instance) const {
|
||||
template <>
|
||||
struct hash<::SymbolKind> {
|
||||
size_t operator()(const ::SymbolKind& instance) const {
|
||||
return std::hash<int>()(static_cast<int>(instance));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
} // namespace std
|
||||
|
||||
struct SymbolIdx {
|
||||
SymbolKind kind;
|
||||
|
Loading…
Reference in New Issue
Block a user