summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/modularize/ModuleAssistant.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/modularize/ModuleAssistant.cpp')
-rw-r--r--clang-tools-extra/modularize/ModuleAssistant.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang-tools-extra/modularize/ModuleAssistant.cpp b/clang-tools-extra/modularize/ModuleAssistant.cpp
index 384ac1b807c..ba9912dfb33 100644
--- a/clang-tools-extra/modularize/ModuleAssistant.cpp
+++ b/clang-tools-extra/modularize/ModuleAssistant.cpp
@@ -124,7 +124,7 @@ Module *Module::findSubModule(llvm::StringRef SubName) {
if ((*I)->Name == SubName)
return *I;
}
- return 0;
+ return nullptr;
}
// Implementation functions:
@@ -135,7 +135,7 @@ Module *Module::findSubModule(llvm::StringRef SubName) {
static const char *ReservedNames[] = {
"config_macros", "export", "module", "conflict", "framework",
"requires", "exclude", "header", "private", "explicit",
- "link", "umbrella", "extern", "use", 0 // Flag end.
+ "link", "umbrella", "extern", "use", nullptr // Flag end.
};
// Convert module name to a non-keyword.
@@ -143,7 +143,7 @@ static const char *ReservedNames[] = {
static std::string
ensureNoCollisionWithReservedName(llvm::StringRef MightBeReservedName) {
std::string SafeName = MightBeReservedName;
- for (int Index = 0; ReservedNames[Index] != 0; ++Index) {
+ for (int Index = 0; ReservedNames[Index] != nullptr; ++Index) {
if (MightBeReservedName == ReservedNames[Index]) {
SafeName.insert(0, "_");
break;
@@ -190,7 +190,7 @@ static bool addModuleDescription(Module *RootModule,
std::string Stem = llvm::sys::path::stem(*I);
Stem = ensureNoCollisionWithReservedName(Stem);
Module *SubModule = CurrentModule->findSubModule(Stem);
- if (SubModule == 0) {
+ if (!SubModule) {
SubModule = new Module(Stem);
CurrentModule->SubModules.push_back(SubModule);
}
@@ -222,7 +222,7 @@ static Module *loadModuleDescriptions(
I != E; ++I) {
// Add as a module.
if (!addModuleDescription(RootModule, *I, HeaderPrefix, Dependencies))
- return NULL;
+ return nullptr;
}
return RootModule;
OpenPOWER on IntegriCloud