[PATCH] D43500: [clang-tidy]: modernize-use-default-member-init: Remove trailing comma and colon.
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 26 09:32:15 PST 2018
aaron.ballman added inline comments.
================
Comment at: unittests/clang-tidy/ClangTidyTest.h:145
+
+ // Options.
+ if (Options.FormatStyle) {
----------------
Extraneous whitespace.
================
Comment at: unittests/clang-tidy/ClangTidyTest.h:147
+ if (Options.FormatStyle) {
+ auto Style = format::getStyle(*Options.FormatStyle,
+ Filename.getSingleStringRef(), "LLVM");
----------------
Please don't use `auto` unless the type is explicitly spelled out in the initialization. (Here and elsewhere in the patch.)
================
Comment at: unittests/clang-tidy/ClangTidyTest.h:159-160
+ CleannedReplacements = std::move(FormattedReplacements);
+ if (!CleannedReplacements)
+ llvm_unreachable("!CleannedReplacements");
+ } else {
----------------
This smells like it should be an assert rather than an unreachable.
================
Comment at: unittests/clang-tidy/ClangTidyTest.h:167
+ if (!Result) {
+ // FIXME: propogate the error.
+ llvm::consumeError(Result.takeError());
----------------
Are you intending to implement this fixme in this patch?
https://reviews.llvm.org/D43500
More information about the cfe-commits
mailing list