Skip to content

Commit 2fbbb7e

Browse files
[clangd] Modernize SymbolLocation::Position (NFC)
1 parent 51c9f12 commit 2fbbb7e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang-tools-extra/clangd/index/SymbolLocation.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct SymbolLocation {
3030
// Position is encoded into 32 bits to save space.
3131
// If Line/Column overflow, the value will be their maximum value.
3232
struct Position {
33-
Position() : LineColumnPacked(0) {}
33+
Position() = default;
3434
void setLine(uint32_t Line);
3535
uint32_t line() const { return LineColumnPacked >> ColumnBits; }
3636
void setColumn(uint32_t Column);
@@ -46,7 +46,7 @@ struct SymbolLocation {
4646
static constexpr uint32_t MaxColumn = (1 << ColumnBits) - 1;
4747

4848
private:
49-
uint32_t LineColumnPacked; // Top 20 bit line, bottom 12 bits column.
49+
uint32_t LineColumnPacked = 0; // Top 20 bit line, bottom 12 bits column.
5050
};
5151

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

0 commit comments

Comments
 (0)