[Support] Use default member initialization (NFC)

Identified with modernize-use-default-member-init.
This commit is contained in:
Kazu Hirata 2022-06-12 18:46:25 -07:00
parent df792bcb02
commit 6c39687567
2 changed files with 4 additions and 4 deletions

View File

@ -166,7 +166,7 @@ public:
// This collects the different subcommands that have been registered.
SmallPtrSet<SubCommand *, 4> 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,

View File

@ -26,14 +26,14 @@ using namespace llvm::sys;
class DynamicLibrary::HandleSet {
typedef std::vector<void *> HandleList;
HandleList Handles;
void *Process;
void *Process = nullptr;
public:
static void *DLOpen(const char *Filename, std::string *Err);
static void DLClose(void *Handle);
static void *DLSym(void *Handle, const char *Symbol);
HandleSet() : Process(nullptr) {}
HandleSet() = default;
~HandleSet();
HandleList::iterator Find(void *Handle) { return find(Handles, Handle); }