[PATCH] D82898: [clang-tidy] Handled insertion only fixits when determining conflicts.
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 28 16:45:15 PDT 2020
njames93 added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:629
Priority = std::make_tuple(Begin, Type, -End, -ErrorSize, ErrorId);
- else
+ return;
+ case ET_Insert:
----------------
aaron.ballman wrote:
> I'd drop these `return` statements and the unreachable, below. The switch is fully-covered, so we'll get a diagnostic if any new enumerations are added and we forget to update this switch.
I'd still need a `break` anyway, but yes the unreachable probably isn't required
================
Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:703
+ Apply[Event.ErrorId] = false;
+ continue;
+ case Event::ET_Insert:
----------------
aaron.ballman wrote:
> Similar here with `continue` and the unreachable.
As this is in a loop, I'm torn whether using `break` makes it less readable. WDYT?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82898/new/
https://reviews.llvm.org/D82898
More information about the cfe-commits
mailing list