Skip to content

Commit

Permalink
[clang] Modernize ReturnAdjustment and ThisAdjustment (NFC)
Browse files Browse the repository at this point in the history
Identified with modernize-use-default-member-init.
  • Loading branch information
kazutakahirata committed Apr 16, 2023
1 parent 79e106f commit 564ddf9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions clang/include/clang/Basic/Thunk.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -64,7 +64,7 @@ struct ReturnAdjustment {
}
} Virtual;

ReturnAdjustment() : NonVirtual(0) {}
ReturnAdjustment() = default;

bool isEmpty() const { return !NonVirtual && Virtual.isEmpty(); }

Expand All @@ -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.
Expand Down Expand Up @@ -131,7 +131,7 @@ struct ThisAdjustment {
}
} Virtual;

ThisAdjustment() : NonVirtual(0) {}
ThisAdjustment() = default;

bool isEmpty() const { return !NonVirtual && Virtual.isEmpty(); }

Expand Down

0 comments on commit 564ddf9

Please sign in to comment.