jdemeule added inline comments.

Comment at: unittests/clang-tidy/ClangTidyTest.h:145
+  if (Options.FormatStyle) {
+    llvm::Expected<format::FormatStyle> Style = format::getStyle(
alexfh wrote:
> I wonder whether it's better to use lit for the tests that require formatting 
> than to expand clang-tidy unit test utilities with runCheckAndFormatOnCode? 
> What was the reason to use unit tests in this patch as opposed to lit tests?
Indeed, that a good question.
Personally, I found unit test easier to launch and debug than lit test and I 
notice that it is not possible to made a unit test which react the same way as 
When I wrote this test, I want it to react as in clang-tidy and for this I try 
to call `cleanupAroundReplacements` in the test.
Adding formatting was more a side effect to have some sustainable and 
comprehensive way to write test.


cfe-commits mailing list

Reply via email to