summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling/CompilationDatabase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Tooling/CompilationDatabase.cpp')
-rw-r--r--clang/lib/Tooling/CompilationDatabase.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Tooling/CompilationDatabase.cpp b/clang/lib/Tooling/CompilationDatabase.cpp
index 164a38d4232..94bdc8d25a4 100644
--- a/clang/lib/Tooling/CompilationDatabase.cpp
+++ b/clang/lib/Tooling/CompilationDatabase.cpp
@@ -52,7 +52,7 @@ CompilationDatabase::loadFromDirectory(StringRef BuildDirectory,
ErrorStream << It->getName() << ": " << DatabaseErrorMessage << "\n";
}
ErrorMessage = ErrorStream.str();
- return NULL;
+ return nullptr;
}
static CompilationDatabase *
@@ -76,7 +76,7 @@ findCompilationDatabaseFromDirectory(StringRef Directory,
Directory = llvm::sys::path::parent_path(Directory);
}
ErrorMessage = ErrorStream.str();
- return NULL;
+ return nullptr;
}
CompilationDatabase *
@@ -151,7 +151,7 @@ private:
// options.
class UnusedInputDiagConsumer : public DiagnosticConsumer {
public:
- UnusedInputDiagConsumer() : Other(0) {}
+ UnusedInputDiagConsumer() : Other(nullptr) {}
// Useful for debugging, chain diagnostics to another consumer after
// recording for our own purposes.
@@ -290,13 +290,13 @@ FixedCompilationDatabase::loadFromCommandLine(int &Argc,
Twine Directory) {
const char **DoubleDash = std::find(Argv, Argv + Argc, StringRef("--"));
if (DoubleDash == Argv + Argc)
- return NULL;
+ return nullptr;
std::vector<const char *> CommandLine(DoubleDash + 1, Argv + Argc);
Argc = DoubleDash - Argv;
std::vector<std::string> StrippedArgs;
if (!stripPositionalArgs(CommandLine, StrippedArgs))
- return 0;
+ return nullptr;
return new FixedCompilationDatabase(Directory, StrippedArgs);
}
OpenPOWER on IntegriCloud