From: Rafael Espindola Date: Sun, 1 Jun 2014 16:16:02 +0000 (+0000) Subject: Don't compare an error_code with nullptr. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6c4692388bee226b9a0d4406a46dce281e7750da;p=clang 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 --- 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; }