Formatting and a TODO

This commit is contained in:
Jacob Dufault 2017-11-18 09:29:48 -08:00
parent eea8a1b07a
commit 6a50c48aaa
3 changed files with 7 additions and 5 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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;