From 6c39687567faee49b7bccdcaaaa35db0d397c19d Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 12 Jun 2022 18:46:25 -0700 Subject: [Support] Use default member initialization (NFC) Identified with modernize-use-default-member-init. --- llvm/lib/Support/CommandLine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Support/CommandLine.cpp') diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index 742e245..eb6c04d 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/lib/Support/CommandLine.cpp @@ -166,7 +166,7 @@ public: // This collects the different subcommands that have been registered. SmallPtrSet RegisteredSubCommands; - CommandLineParser() : ActiveSubCommand(nullptr) { + CommandLineParser() { registerSubCommand(&*TopLevelSubCommand); registerSubCommand(&*AllSubCommands); } @@ -418,7 +418,7 @@ public: } private: - SubCommand *ActiveSubCommand; + SubCommand *ActiveSubCommand = nullptr; Option *LookupOption(SubCommand &Sub, StringRef &Arg, StringRef &Value); Option *LookupLongOption(SubCommand &Sub, StringRef &Arg, StringRef &Value, -- cgit v1.1