ARCMigrate: Initialize fields in EditEntry inline, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 3 Dec 2020 01:32:08 +0000 (17:32 -0800)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 4 Dec 2020 22:43:22 +0000 (14:43 -0800)
Initialize the fields inline instead of having to manually write out a
default constructor.

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

clang/lib/ARCMigrate/ObjCMT.cpp

index 51c4a46..ef2985d 100644 (file)
@@ -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