llvm-project/clang-tools-extra/docs/clang-tidy
Hyrum Wright 35cb7e9fe8 [clang-tidy] Add the abseil-duration-subtraction check
Summary:
This check uses the context of a subtraction expression as well as knowledge
about the Abseil Time types, to infer the type of the second operand of some
subtraction expressions in Duration conversions. For example:

   absl::ToDoubleSeconds(duration) - foo

can become
   absl::ToDoubleSeconds(duration - absl::Seconds(foo))

This ensures that time calculations are done in the proper domain, and also
makes it easier to further deduce the types of the second operands to these
expressions.

Reviewed By: JonasToth

Tags: #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D55245

llvm-svn: 349073
2018-12-13 19:23:52 +00:00
..
checks [clang-tidy] Add the abseil-duration-subtraction check 2018-12-13 19:23:52 +00:00
index.rst [clang-tidy] Add a separate section for NOLINT(NEXTLINE)? doc. 2018-10-23 16:48:16 +00:00