Don't compare an error_code with nullptr.

llvm-svn: 209993
This commit is contained in:
Rafael Espindola
2014-06-01 16:16:02 +00:00
parent 3628cb9cb6
commit 8390a257ed

View File

@@ -147,7 +147,7 @@ JSONCompilationDatabase::loadFromFile(StringRef FilePath,
std::unique_ptr<llvm::MemoryBuffer> 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;
}