alexfh 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);
----------------
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).


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