From ccbc35edc230838df330e4fad1023e016f267e2b Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 20 May 2014 04:51:16 +0000 Subject: [C++11] Use 'nullptr'. Tooling edition. llvm-svn: 209192 --- clang/lib/Tooling/CompilationDatabase.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'clang/lib/Tooling/CompilationDatabase.cpp') 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 CommandLine(DoubleDash + 1, Argv + Argc); Argc = DoubleDash - Argv; std::vector StrippedArgs; if (!stripPositionalArgs(CommandLine, StrippedArgs)) - return 0; + return nullptr; return new FixedCompilationDatabase(Directory, StrippedArgs); } -- cgit v1.2.3