[PATCH] D82898: [clang-tidy] Handled insertion only fixits when determining conflicts.
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 28 11:38:13 PDT 2020
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM with a few style nits.
================
Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:629
Priority = std::make_tuple(Begin, Type, -End, -ErrorSize, ErrorId);
- else
+ return;
+ case ET_Insert:
----------------
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.
================
Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:703
+ Apply[Event.ErrorId] = false;
+ continue;
+ case Event::ET_Insert:
----------------
Similar here with `continue` and the unreachable.
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