[PATCH] Change ClangTool::run output processing file to debug output

Manuel Klimek klimek at google.com
Fri Mar 15 08:56:31 PDT 2013



================
Comment at: lib/Tooling/Tooling.cpp:308
@@ -304,3 +307,3 @@
     if (!Invocation.run()) {
-      llvm::outs() << "Error while processing " << File << ".\n";
+      llvm::errs() << "Error while processing " << File << ".\n";
       ProcessingFailed = true;
----------------
Can you add a FIXME that we should use Diagnostics here?
For the "processing" we might want to go to a callback mechanism where the tool writer can output whatever they want for each file.

This change looks like a strict improvement though, so looks good.

================
Comment at: test/Tooling/pch.cpp:10
@@ -12,1 +9,3 @@
+// the test file with an unrelated include as second translation unit.
+// Test for an empty file after clang-check is executed.
 // RUN: clang-check "%S/Inputs/pch.cpp" "%s" -- -include-pch %t1 -I "%S" -c >%t2 2>&1
----------------
Wouldn't an empty file also occur if nothing is processed at all?


http://llvm-reviews.chandlerc.com/D543



More information about the cfe-commits mailing list