]> granicus.if.org Git - clang/commitdiff
Fix spurious output in JSONCompilationDatabase
authorArnaud A. de Grandmaison <arnaud.adegm@gmail.com>
Sat, 12 Jan 2013 18:37:52 +0000 (18:37 +0000)
committerArnaud A. de Grandmaison <arnaud.adegm@gmail.com>
Sat, 12 Jan 2013 18:37:52 +0000 (18:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172321 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Tooling/JSONCompilationDatabase.cpp

index 25284cf11f2ff66683a62939af3ac54eb6e298da..197b7e76f0a7f676c8606458d2e27e960b3221b5 100644 (file)
@@ -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<CompileCommand>();
-  }
   llvm::StringMap< std::vector<CompileCommandRef> >::const_iterator
     CommandsRefI = IndexByFile.find(Match);
   if (CommandsRefI == IndexByFile.end())