[PATCH] D50389: [clang-tidy] new check for Abseil
Jonas Toth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 7 14:44:32 PDT 2018
JonasToth added inline comments.
================
Comment at: clang-tidy/abseil/DurationDivisionCheck.cpp:37
+void DurationDivisionCheck::check(const MatchFinder::MatchResult& result) {
+ const auto* op = result.Nodes.getNodeAs<CXXOperatorCallExpr>("op");
+ diag(op->getOperatorLoc(),
----------------
JonasToth wrote:
> Please follow the naming convention here as well -> `Op` or better `OpCall` or similar to have more telling names.
`op` still is lowercase.
================
Comment at: clang-tidy/abseil/DurationDivisionCheck.cpp:30
+ hasOverloadedOperatorName("/"), argumentCountIs(2),
+ hasArgument(0, expr(is_duration)),
+ hasArgument(1, expr(is_duration)), expr().bind("OpCall")))),
----------------
s/is_duration/IsDuration/ twice
================
Comment at: docs/ReleaseNotes.rst:59
--------------------------
+- New :doc:`abseil-duration-division
+ <clang-tidy/checks/abseil-duration-division>` check.
----------------
Please add one empty line above and please remove the `The improvements are...` line.
This might clash with other checks that are in review right now, but yours might be the first one that lands.
https://reviews.llvm.org/D50389
More information about the cfe-commits
mailing list