Author: Kazu Hirata
Date: 2023-04-16T14:48:16-07:00
New Revision: 564ddf986c97323bf35284cb2b404d21f42d563b

URL: 
https://github.com/llvm/llvm-project/commit/564ddf986c97323bf35284cb2b404d21f42d563b
DIFF: 
https://github.com/llvm/llvm-project/commit/564ddf986c97323bf35284cb2b404d21f42d563b.diff

LOG: [clang] Modernize ReturnAdjustment and ThisAdjustment (NFC)

Identified with modernize-use-default-member-init.

Added: 
    

Modified: 
    clang/include/clang/Basic/Thunk.h

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/Thunk.h 
b/clang/include/clang/Basic/Thunk.h
index 91088be6ae73..0247e279408f 100644
--- a/clang/include/clang/Basic/Thunk.h
+++ b/clang/include/clang/Basic/Thunk.h
@@ -26,7 +26,7 @@ class CXXMethodDecl;
 struct ReturnAdjustment {
   /// The non-virtual adjustment from the derived object to its
   /// nearest virtual base.
-  int64_t NonVirtual;
+  int64_t NonVirtual = 0;
 
   /// Holds the ABI-specific information about the virtual return
   /// adjustment, if needed.
@@ -64,7 +64,7 @@ struct ReturnAdjustment {
     }
   } Virtual;
 
-  ReturnAdjustment() : NonVirtual(0) {}
+  ReturnAdjustment() = default;
 
   bool isEmpty() const { return !NonVirtual && Virtual.isEmpty(); }
 
@@ -91,7 +91,7 @@ struct ReturnAdjustment {
 struct ThisAdjustment {
   /// The non-virtual adjustment from the derived object to its
   /// nearest virtual base.
-  int64_t NonVirtual;
+  int64_t NonVirtual = 0;
 
   /// Holds the ABI-specific information about the virtual this
   /// adjustment, if needed.
@@ -131,7 +131,7 @@ struct ThisAdjustment {
     }
   } Virtual;
 
-  ThisAdjustment() : NonVirtual(0) {}
+  ThisAdjustment() = default;
 
   bool isEmpty() const { return !NonVirtual && Virtual.isEmpty(); }
 


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

Reply via email to