[llvm] r287857 - [CommandLine] Remove redundant initializers for StringRef members
Malcolm Parsons via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 24 00:54:05 PST 2016
Author: malcolm.parsons
Date: Thu Nov 24 02:54:05 2016
New Revision: 287857
URL: http://llvm.org/viewvc/llvm-project?rev=287857&view=rev
Log:
[CommandLine] Remove redundant initializers for StringRef members
Summary: The default constructor for a StringRef stores an empty string.
Reviewers: beanz, zturner
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D27067
Modified:
llvm/trunk/include/llvm/Support/CommandLine.h
Modified: llvm/trunk/include/llvm/Support/CommandLine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CommandLine.h?rev=287857&r1=287856&r2=287857&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/CommandLine.h (original)
+++ llvm/trunk/include/llvm/Support/CommandLine.h Thu Nov 24 02:54:05 2016
@@ -179,8 +179,8 @@ extern OptionCategory GeneralCategory;
//
class SubCommand {
private:
- StringRef Name = "";
- StringRef Description = "";
+ StringRef Name;
+ StringRef Description;
protected:
void registerSubCommand();
@@ -304,8 +304,8 @@ protected:
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; }
More information about the llvm-commits
mailing list