[clang] 9ae0a46 - ARCMigrate: Initialize fields in EditEntry inline, NFC

Duncan P. N. Exon Smith via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 4 14:45:15 PST 2020


Author: Duncan P. N. Exon Smith
Date: 2020-12-04T14:43:22-08:00
New Revision: 9ae0a46f2bbff5c0eb962c5a6225a2b469d1802f

URL: https://github.com/llvm/llvm-project/commit/9ae0a46f2bbff5c0eb962c5a6225a2b469d1802f
DIFF: https://github.com/llvm/llvm-project/commit/9ae0a46f2bbff5c0eb962c5a6225a2b469d1802f.diff

LOG: ARCMigrate: Initialize fields in EditEntry inline, NFC

Initialize the fields inline instead of having to manually write out a
default constructor.

Differential Revision: https://reviews.llvm.org/D92597

Added: 
    

Modified: 
    clang/lib/ARCMigrate/ObjCMT.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/ARCMigrate/ObjCMT.cpp b/clang/lib/ARCMigrate/ObjCMT.cpp
index 51c4a460cc25..ef2985d16d23 100644
--- a/clang/lib/ARCMigrate/ObjCMT.cpp
+++ b/clang/lib/ARCMigrate/ObjCMT.cpp
@@ -2034,12 +2034,10 @@ MigrateSourceAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) {
 
 namespace {
 struct EditEntry {
-  const FileEntry *File;
-  unsigned Offset;
-  unsigned RemoveLen;
+  const FileEntry *File = nullptr;
+  unsigned Offset = 0;
+  unsigned RemoveLen = 0;
   std::string Text;
-
-  EditEntry() : File(), Offset(), RemoveLen() {}
 };
 } // end anonymous namespace
 


        


More information about the cfe-commits mailing list