From 6c4692388bee226b9a0d4406a46dce281e7750da Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Sun, 1 Jun 2014 16:16:02 +0000 Subject: [PATCH] Don't compare an error_code with nullptr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209993 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Tooling/JSONCompilationDatabase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Tooling/JSONCompilationDatabase.cpp b/lib/Tooling/JSONCompilationDatabase.cpp index bba71f2367..256b49c889 100644 --- a/lib/Tooling/JSONCompilationDatabase.cpp +++ b/lib/Tooling/JSONCompilationDatabase.cpp @@ -147,7 +147,7 @@ JSONCompilationDatabase::loadFromFile(StringRef FilePath, std::unique_ptr DatabaseBuffer; llvm::error_code Result = llvm::MemoryBuffer::getFile(FilePath, DatabaseBuffer); - if (Result != nullptr) { + if (Result) { ErrorMessage = "Error while opening JSON database: " + Result.message(); return nullptr; } -- 2.40.0