Skip to content

Commit

Permalink
[Support] Use default member initialization (NFC)
Browse files Browse the repository at this point in the history
Identified with modernize-use-default-member-init.
  • Loading branch information
kazutakahirata committed Jun 13, 2022
1 parent df792bc commit 6c39687
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/Support/CommandLine.cpp
Expand Up @@ -166,7 +166,7 @@ class CommandLineParser {
// This collects the different subcommands that have been registered.
SmallPtrSet<SubCommand *, 4> RegisteredSubCommands;

CommandLineParser() : ActiveSubCommand(nullptr) {
CommandLineParser() {
registerSubCommand(&*TopLevelSubCommand);
registerSubCommand(&*AllSubCommands);
}
Expand Down Expand Up @@ -418,7 +418,7 @@ class CommandLineParser {
}

private:
SubCommand *ActiveSubCommand;
SubCommand *ActiveSubCommand = nullptr;

Option *LookupOption(SubCommand &Sub, StringRef &Arg, StringRef &Value);
Option *LookupLongOption(SubCommand &Sub, StringRef &Arg, StringRef &Value,
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Support/DynamicLibrary.cpp
Expand Up @@ -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); }
Expand Down

0 comments on commit 6c39687

Please sign in to comment.