mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-25 17:11:59 +00:00
Positions are now 32 bits (down from 96ish)
This commit is contained in:
parent
95b567838c
commit
cd50eb9e35
@ -1378,32 +1378,31 @@ std::vector<std::unique_ptr<IndexedFile>> Parse(IndexerConfig* config, FileConsu
|
||||
entry->id_cache.primary_file = entry->path;
|
||||
}
|
||||
|
||||
/*
|
||||
TODO: Fix interesting checks.
|
||||
// TODO: Fix interesting checks.
|
||||
for (auto& entry : result) {
|
||||
for (auto& type : entry->types) {
|
||||
if (!type.HasInterestingState()) {
|
||||
std::cerr << "!!!! NO INTERSETING STATE FOR " << entry->path << " of !!! " << filename << std::endl;
|
||||
std::cerr << "!!!! NO INTERESTING STATE FOR " << entry->path << " of !!! " << filename << std::endl;
|
||||
std::cerr << "!!!! USR " << type.def.usr << std::endl;
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
for (auto& func : entry->funcs) {
|
||||
if (!func.HasInterestingState()) {
|
||||
std::cerr << "!!!! NO INTERSETING STATE FOR " << entry->path << " of !!! " << filename << std::endl;
|
||||
std::cerr << "!!!! NO INTERESTING STATE FOR " << entry->path << " of !!! " << filename << std::endl;
|
||||
std::cerr << "!!!! USR " << func.def.usr << std::endl;
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
for (auto& var : entry->vars) {
|
||||
if (!var.HasInterestingState()) {
|
||||
std::cerr << "!!!! NO INTERSETING STATE FOR " << entry->path << " of !!! " << filename << std::endl;
|
||||
std::cerr << "!!!! NO INTERESTING STATE FOR " << entry->path << " of !!! " << filename << std::endl;
|
||||
std::cerr << "!!!! USR " << var.def.usr << std::endl;
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
#include <string>
|
||||
|
||||
struct Position {
|
||||
int32_t line = -1;
|
||||
int32_t column = -1;
|
||||
int16_t line = -1;
|
||||
int16_t column = -1;
|
||||
|
||||
Position();
|
||||
Position(int32_t line, int32_t column);
|
||||
@ -21,6 +21,7 @@ struct Position {
|
||||
bool operator!=(const Position& that) const;
|
||||
bool operator<(const Position& that) const;
|
||||
};
|
||||
static_assert(sizeof(Position) == 4, "Investigate, Position should be 32-bits for indexer size reasons");
|
||||
|
||||
struct Range {
|
||||
Position start;
|
||||
|
@ -22,7 +22,7 @@ void Reflect(Reader& visitor, std::string& value) {
|
||||
value = visitor.GetString();
|
||||
}
|
||||
void Reflect(Writer& visitor, std::string& value) {
|
||||
visitor.String(value.c_str(), value.size());
|
||||
visitor.String(value.c_str(), (rapidjson::SizeType)value.size());
|
||||
}
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@ void Reflect(Reader& visitor, Position& value) {
|
||||
}
|
||||
void Reflect(Writer& visitor, Position& value) {
|
||||
std::string output = value.ToString();
|
||||
visitor.String(output.c_str(), output.size());
|
||||
visitor.String(output.c_str(), (rapidjson::SizeType)output.size());
|
||||
}
|
||||
|
||||
|
||||
@ -51,7 +51,7 @@ void Reflect(Reader& visitor, Range& value) {
|
||||
}
|
||||
void Reflect(Writer& visitor, Range& value) {
|
||||
std::string output = value.ToString();
|
||||
visitor.String(output.c_str(), output.size());
|
||||
visitor.String(output.c_str(), (rapidjson::SizeType)output.size());
|
||||
}
|
||||
|
||||
// Id<T>
|
||||
|
Loading…
Reference in New Issue
Block a user