diff options
author | Jonas Toth <jonas.toth@gmail.com> | 2018-12-03 18:59:27 +0000 |
---|---|---|
committer | Jonas Toth <jonas.toth@gmail.com> | 2018-12-03 18:59:27 +0000 |
commit | 9cb4a93b24a8bb2c54d01c3f602c892c24ee890d (patch) | |
tree | 0edc2b3c312201aede3cc269b876f8c912945202 /clang-tools-extra/docs | |
parent | fcbf3774c32c04dced442f8b174cf43b49d9355f (diff) |
Revert "[clang-tidy] Add the abseil-duration-comparison check"
This commit broke buildbots and needs adjustments.
Diffstat (limited to 'clang-tools-extra/docs')
-rw-r--r-- | clang-tools-extra/docs/ReleaseNotes.rst | 6 | ||||
-rw-r--r-- | clang-tools-extra/docs/clang-tidy/checks/abseil-duration-comparison.rst | 33 | ||||
-rw-r--r-- | clang-tools-extra/docs/clang-tidy/checks/list.rst | 1 |
3 files changed, 0 insertions, 40 deletions
diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst index 19079686059..c7229df7086 100644 --- a/clang-tools-extra/docs/ReleaseNotes.rst +++ b/clang-tools-extra/docs/ReleaseNotes.rst @@ -67,12 +67,6 @@ The improvements are... Improvements to clang-tidy -------------------------- -- New :doc:`abseil-duration-comparison - <clang-tidy/checks/abseil-duration-comparison>` check. - - Checks for comparisons which should be done in the ``absl::Duration`` domain - instead of the float of integer domains. - - New :doc:`abseil-duration-division <clang-tidy/checks/abseil-duration-division>` check. diff --git a/clang-tools-extra/docs/clang-tidy/checks/abseil-duration-comparison.rst b/clang-tools-extra/docs/clang-tidy/checks/abseil-duration-comparison.rst deleted file mode 100644 index 6df0514dec6..00000000000 --- a/clang-tools-extra/docs/clang-tidy/checks/abseil-duration-comparison.rst +++ /dev/null @@ -1,33 +0,0 @@ -.. title:: clang-tidy - abseil-duration-comparison - -abseil-duration-comparison -========================== - -Checks for comparisons which should be in the ``absl::Duration`` domain instead -of the floating point or integer domains. - -N.B.: In cases where a ``Duration`` was being converted to an integer and then -compared against a floating-point value, truncation during the ``Duration`` -conversion might yield a different result. In practice this is very rare, and -still indicates a bug which should be fixed. - -Examples: - -.. code-block:: c++ - - // Original - Comparison in the floating point domain - double x; - absl::Duration d; - if (x < absl::ToDoubleSeconds(d)) ... - - // Suggested - Compare in the absl::Duration domain instead - if (absl::Seconds(x) < d) ... - - - // Original - Comparison in the integer domain - int x; - absl::Duration d; - if (x < absl::ToInt64Microseconds(d)) ... - - // Suggested - Compare in the absl::Duration domain instead - if (absl::Microseconds(x) < d) ... diff --git a/clang-tools-extra/docs/clang-tidy/checks/list.rst b/clang-tools-extra/docs/clang-tidy/checks/list.rst index e3528ae90e8..7fa19471895 100644 --- a/clang-tools-extra/docs/clang-tidy/checks/list.rst +++ b/clang-tools-extra/docs/clang-tidy/checks/list.rst @@ -4,7 +4,6 @@ Clang-Tidy Checks ================= .. toctree:: - abseil-duration-comparison abseil-duration-division abseil-duration-factory-float abseil-duration-factory-scale |