From 564ddf986c97323bf35284cb2b404d21f42d563b Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 16 Apr 2023 14:48:16 -0700 Subject: [PATCH] [clang] Modernize ReturnAdjustment and ThisAdjustment (NFC) Identified with modernize-use-default-member-init. --- clang/include/clang/Basic/Thunk.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clang/include/clang/Basic/Thunk.h b/clang/include/clang/Basic/Thunk.h index 91088be..0247e27 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(); } -- 2.7.4