[PATCH] D43500: [clang-tidy]: modernize-use-default-member-init: Remove trailing comma and colon.

Jeremy Demeule via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 6 13:05:36 PST 2018


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 clang-tidy.
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.



https://reviews.llvm.org/D43500





More information about the cfe-commits mailing list