In general, the Explanation field is optional in RewriteRule cases. But,
because the primary purpose of clang-tidy checks is to provide users with
diagnostics, we assume that a missing explanation is a bug. This change adds an
assertion that checks all cases for an explanation, and updates the code to rely
on that assertion correspondingly.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 32407 Build 32406: arc lint + arc unit
Event Timeline
Comment Actions
LGTM, thanks!
clang-tools-extra/unittests/clang-tidy/TransformerClangTidyCheckTest.cpp | ||
---|---|---|
38 | NIT: this might be the first place people look at when writing the check, so we might want to provide a real explanation here. |
clang-tools-extra/unittests/clang-tidy/TransformerClangTidyCheckTest.cpp | ||
---|---|---|
38 | will do. But, realized this is a bit ugly so sent https://reviews.llvm.org/D62390 to add support for the explanation to makeRule. |
NIT: this might be the first place people look at when writing the check, so we might want to provide a real explanation here.
Something like negate condition and revert then and else branches