Index: cfe/trunk/lib/Tooling/JSONCompilationDatabase.cpp =================================================================== --- cfe/trunk/lib/Tooling/JSONCompilationDatabase.cpp +++ cfe/trunk/lib/Tooling/JSONCompilationDatabase.cpp @@ -146,12 +146,8 @@ loadFromDirectory(StringRef Directory, std::string &ErrorMessage) override { SmallString<1024> JSONDatabasePath(Directory); llvm::sys::path::append(JSONDatabasePath, "compile_commands.json"); - std::unique_ptr Database( - JSONCompilationDatabase::loadFromFile( - JSONDatabasePath, ErrorMessage, JSONCommandLineSyntax::AutoDetect)); - if (!Database) - return nullptr; - return Database; + return JSONCompilationDatabase::loadFromFile( + JSONDatabasePath, ErrorMessage, JSONCommandLineSyntax::AutoDetect); } };