[clang] 477457c - [CodeGen] Modernize NullReturnState (NFC)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 20 09:43:15 PDT 2023


Author: Kazu Hirata
Date: 2023-08-20T09:43:01-07:00
New Revision: 477457c3a7c3ca5f6042a35e61226df0f56aec34

URL: https://github.com/llvm/llvm-project/commit/477457c3a7c3ca5f6042a35e61226df0f56aec34
DIFF: https://github.com/llvm/llvm-project/commit/477457c3a7c3ca5f6042a35e61226df0f56aec34.diff

LOG: [CodeGen] Modernize NullReturnState (NFC)

Added: 
    

Modified: 
    clang/lib/CodeGen/CGObjCMac.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp
index 51c87f985fdf05..f55759581fa78e 100644
--- a/clang/lib/CodeGen/CGObjCMac.cpp
+++ b/clang/lib/CodeGen/CGObjCMac.cpp
@@ -1713,8 +1713,8 @@ class CGObjCNonFragileABIMac : public CGObjCCommonMac {
 /// A helper class for performing the null-initialization of a return
 /// value.
 struct NullReturnState {
-  llvm::BasicBlock *NullBB;
-  NullReturnState() : NullBB(nullptr) {}
+  llvm::BasicBlock *NullBB = nullptr;
+  NullReturnState() = default;
 
   /// Perform a null-check of the given receiver.
   void init(CodeGenFunction &CGF, llvm::Value *receiver) {


        


More information about the cfe-commits mailing list