Skip to content

Commit

Permalink
[clangd] Modernize SymbolLocation::Position (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata committed Aug 19, 2023
1 parent 51c9f12 commit 2fbbb7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang-tools-extra/clangd/index/SymbolLocation.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct SymbolLocation {
// Position is encoded into 32 bits to save space.
// If Line/Column overflow, the value will be their maximum value.
struct Position {
Position() : LineColumnPacked(0) {}
Position() = default;
void setLine(uint32_t Line);
uint32_t line() const { return LineColumnPacked >> ColumnBits; }
void setColumn(uint32_t Column);
Expand All @@ -46,7 +46,7 @@ struct SymbolLocation {
static constexpr uint32_t MaxColumn = (1 << ColumnBits) - 1;

private:
uint32_t LineColumnPacked; // Top 20 bit line, bottom 12 bits column.
uint32_t LineColumnPacked = 0; // Top 20 bit line, bottom 12 bits column.
};

/// The symbol range, using half-open range [Start, End).
Expand Down

0 comments on commit 2fbbb7e

Please sign in to comment.