summaryrefslogtreecommitdiff
path: root/lib/Tooling/CompilationDatabase.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2014-05-20 04:51:16 +0000
committerCraig Topper <craig.topper@gmail.com>2014-05-20 04:51:16 +0000
commit070be84e4ab23f9151d602fbe820e0f13c9ff21b (patch)
treed41c182546553ae1348a64af4314b3481c9f4463 /lib/Tooling/CompilationDatabase.cpp
parentfa361696b1ec1ab8ee0a6f25a61e1c1a529d1bc4 (diff)
downloadclang-070be84e4ab23f9151d602fbe820e0f13c9ff21b.tar.gz
clang-070be84e4ab23f9151d602fbe820e0f13c9ff21b.tar.bz2
clang-070be84e4ab23f9151d602fbe820e0f13c9ff21b.tar.xz
[C++11] Use 'nullptr'. Tooling edition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209192 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Tooling/CompilationDatabase.cpp')
-rw-r--r--lib/Tooling/CompilationDatabase.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Tooling/CompilationDatabase.cpp b/lib/Tooling/CompilationDatabase.cpp
index 164a38d423..94bdc8d25a 100644
--- a/lib/Tooling/CompilationDatabase.cpp
+++ b/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);
}