From: Arnaud A. de Grandmaison Date: Sat, 12 Jan 2013 18:37:52 +0000 (+0000) Subject: Fix spurious output in JSONCompilationDatabase X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9cd506b7c983829a33ae7ac1297228d146c58a69;p=clang Fix spurious output in JSONCompilationDatabase git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172321 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Tooling/JSONCompilationDatabase.cpp b/lib/Tooling/JSONCompilationDatabase.cpp index 25284cf11f..197b7e76f0 100644 --- a/lib/Tooling/JSONCompilationDatabase.cpp +++ b/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())