[PATCH] D92597: ARCMigrate: Initialize fields in EditEntry inline, NFC
Duncan P. N. Exon Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 3 12:09:08 PST 2020
dexonsmith created this revision.
dexonsmith added reviewers: jansvoboda11, JDevlieghere, akyrtzi.
Herald added a subscriber: ributzka.
dexonsmith requested review of this revision.
Herald added a project: clang.
Initialize the fields inline instead of having to manually write out a
default constructor.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D92597
Files:
clang/lib/ARCMigrate/ObjCMT.cpp
Index: clang/lib/ARCMigrate/ObjCMT.cpp
===================================================================
--- clang/lib/ARCMigrate/ObjCMT.cpp
+++ clang/lib/ARCMigrate/ObjCMT.cpp
@@ -2034,12 +2034,10 @@
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92597.309330.patch
Type: text/x-patch
Size: 503 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201203/48543a55/attachment.bin>
More information about the cfe-commits
mailing list