[PATCH] D56532: [clang-tidy] Add the abseil-duration-conversion-cast check
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 10 09:43:08 PST 2019
MyDeveloperDay added a comment.
nit's come from running running validate_check.py on the rst file from D55523: [clang-tidy] Linting .rst documentation <https://reviews.llvm.org/D55523>
$ ../clang-tidy/validate_check.py --rst abseil-duration-conversion-cast.rst
Checking abseil-duration-conversion-cast.rst...
warning: line 6 maximize 80 characters by joining:'[Checks for casts of ``absl::Duration`` conversion functions, and recommends]' and '[the...]
warning: line 20 multiple blank lines
warning: line 28 multiple blank lines
================
Comment at: docs/clang-tidy/checks/abseil-duration-conversion-cast.rst:20
+
+
+ // Original - Cast from a double to an integer
----------------
nit: double blank line
================
Comment at: docs/clang-tidy/checks/abseil-duration-conversion-cast.rst:28
+
+
+Note: In the second example, the suggested fix could yield a different result,
----------------
nit: double blank line
================
Comment at: docs/clang-tidy/checks/abseil-duration-conversion-cast.rst:31
+as the conversion to integer could truncate. In practice, this is very rare,
+and you should use ``absl::Trunc`` to perform this operation explicitly
+instead.
----------------
nit: I believe that 'instead.' can come onto this line and still be <= 80 characters (which might actually be a bug in validate_check.py that it doesn't detect it)
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56532/new/
https://reviews.llvm.org/D56532
More information about the cfe-commits
mailing list