diff --git a/clang/lib/Tooling/JSONCompilationDatabase.cpp b/clang/lib/Tooling/JSONCompilationDatabase.cpp index 25284cf11f2f..197b7e76f0a7 100644 --- a/clang/lib/Tooling/JSONCompilationDatabase.cpp +++ b/clang/lib/Tooling/JSONCompilationDatabase.cpp @@ -167,12 +167,8 @@ JSONCompilationDatabase::getCompileCommands(StringRef FilePath) const { std::string Error; llvm::raw_string_ostream ES(Error); StringRef Match = MatchTrie.findEquivalent(NativeFilePath.str(), ES); - if (Match.empty()) { - if (Error.empty()) - Error = "No match found."; - llvm::outs() << Error << "\n"; + if (Match.empty()) return std::vector(); - } llvm::StringMap< std::vector >::const_iterator CommandsRefI = IndexByFile.find(Match); if (CommandsRefI == IndexByFile.end())