[PATCH] D27067: [CommandLine] Remove redundant initializers for StringRef members
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 23 14:49:27 PST 2016
lgtm
On Wed, Nov 23, 2016 at 2:40 PM Malcolm Parsons <malcolm.parsons at gmail.com>
wrote:
> malcolm.parsons created this revision.
> malcolm.parsons added reviewers: beanz, zturner.
> malcolm.parsons added a subscriber: llvm-commits.
>
> The default constructor for a StringRef stores an empty string.
>
>
> https://reviews.llvm.org/D27067
>
> Files:
> include/llvm/Support/CommandLine.h
>
>
> Index: include/llvm/Support/CommandLine.h
> ===================================================================
> --- include/llvm/Support/CommandLine.h
> +++ include/llvm/Support/CommandLine.h
> @@ -179,8 +179,8 @@
> //
> class SubCommand {
> private:
> - StringRef Name = "";
> - StringRef Description = "";
> + StringRef Name;
> + StringRef Description;
>
> protected:
> void registerSubCommand();
> @@ -304,8 +304,8 @@
> enum OptionHidden Hidden)
> : NumOccurrences(0), Occurrences(OccurrencesFlag), Value(0),
> HiddenFlag(Hidden), Formatting(NormalFormatting), Misc(0),
> Position(0),
> - AdditionalVals(0), ArgStr(""), HelpStr(""), ValueStr(""),
> - Category(&GeneralCategory), FullyInitialized(false) {}
> + AdditionalVals(0), Category(&GeneralCategory),
> FullyInitialized(false) {
> + }
>
> inline void setNumAdditionalVals(unsigned n) { AdditionalVals = n; }
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161123/301ff0fa/attachment.html>
More information about the llvm-commits
mailing list