sepavloff added inline comments.

================
Comment at: lib/Tooling/CompilationDatabase.cpp:208
   IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts = new DiagnosticOptions();
-  UnusedInputDiagConsumer DiagClient;
+  TextDiagnosticPrinter DiagnosticPrinter(llvm::errs(), &*DiagOpts);
+  UnusedInputDiagConsumer DiagClient(DiagnosticPrinter);
----------------
alexfh wrote:
> This code is used as a library not only for command-line tools. Directly 
> using stderr is wrong in many use cases of the Tooling library. It should 
> instead somehow let the user of the library get these errors via a provided 
> DiagnosticConsumer. Not sure how to do this here without a more careful 
> reading of the code, but wanted to let you know that this change causes a 
> regression at least for clang-tidy (and likely for many other Clang tools).
This function does not have a way to report error, so its interface needs to be 
changed first. The change D33272 implements such modification.



https://reviews.llvm.org/D33013



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to