[PATCH] D58137: [clang-tidy] Add the abseil-time-subtraction check

Eugene Zelenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 12 11:54:06 PST 2019


Eugene.Zelenko added inline comments.


================
Comment at: docs/ReleaseNotes.rst:91
+
+  Finds and fixes `absl::Time` subtraction expressions to do subtraction
+  in the Time domain instead of the numeric domain.
----------------
Please use two not one ` for language constructs.


================
Comment at: docs/clang-tidy/checks/abseil-time-subtraction.rst:11
+information:
+ - When the result is a ``Duration`` and the first argument is a ``Time``.
+ - When the second argument is a ``Time``.
----------------
Will be good idea to always use //absl::// prefix. Same in other places.


================
Comment at: docs/clang-tidy/checks/abseil-time-subtraction.rst:25
+
+  // Original - `Duration` result and first operand is a `Time`.
+  absl::Duration d = absl::Seconds(absl::ToUnixSeconds(t) - x);
----------------
` doesn't make sense in comments. Same below.


Repository:
  rCTE Clang Tools Extra

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58137/new/

https://reviews.llvm.org/D58137





More information about the cfe-commits mailing list