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
- rL LLVM
Event Timeline
Comment Actions
LGTM, thanks!
clang-tools-extra/unittests/clang-tidy/TransformerClangTidyCheckTest.cpp | ||
---|---|---|
38 ↗ | (On Diff #201041) | 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 ↗ | (On Diff #201041) | will do. But, realized this is a bit ugly so sent https://reviews.llvm.org/D62390 to add support for the explanation to makeRule. |