Author: Kazu Hirata
Date: 2023-08-19T00:27:08-07:00
New Revision: 2fbbb7efe0d23c69029f175b6b0555b45fcf9c0e

URL: 
https://github.com/llvm/llvm-project/commit/2fbbb7efe0d23c69029f175b6b0555b45fcf9c0e
DIFF: 
https://github.com/llvm/llvm-project/commit/2fbbb7efe0d23c69029f175b6b0555b45fcf9c0e.diff

LOG: [clangd] Modernize SymbolLocation::Position (NFC)

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/index/SymbolLocation.h 
b/clang-tools-extra/clangd/index/SymbolLocation.h
index eadf211bb3bf6a..ea7d605172e477 100644
--- a/clang-tools-extra/clangd/index/SymbolLocation.h
+++ b/clang-tools-extra/clangd/index/SymbolLocation.h
@@ -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);
@@ -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).


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to