With the change https://reviews.llvm.org/D33013 driver does not build
compilation object if command line is invalid, in particular, if
unrecognized option is provided. In such cases it prints diagnostics
on stderr. The test 'clang-tidy/diagnostic.cpp' checks reaction on
unrecognized option and will fail when D33013 is applied. With this
change the test works in either case.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Feel free to commit this to fix buildbots, however the underlying D33013 raises some questions.
Clang-tidy is also used as a library, in which case it should capture all compiler diagnostics and pass them to the caller. This test verifies that clang-tidy actually captures the compilation error, and with D33013 this seems to have broken for the diagnostics related to command line parsing. Modifying the driver to directly output these errors to stderr instead of using DiagnosticConsumer seems like a wrong thing to do.