[PATCH] D53830: [clang-tidy]: Abseil: new check 'upgrade-duration-conversions'

Alex Strelnikov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 29 13:18:13 PDT 2018


astrelni created this revision.
astrelni added reviewers: ahedberg, hokein.
astrelni added a project: clang-tools-extra.
Herald added subscribers: jfb, xazax.hun, mgorny.

Introduce a new check to upgrade user code based on upcoming API breaking changes to absl::Duration.

The check finds calls to arithmetic operators and factory functions for absl::Duration that rely on an implicit user defined conversion to int64_t. These cases will no longer compile after proposed changes are released. Suggested fixes explicitly cast the argument int64_t.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D53830

Files:
  clang-tidy/abseil/AbseilTidyModule.cpp
  clang-tidy/abseil/CMakeLists.txt
  clang-tidy/abseil/UpgradeDurationConversionsCheck.cpp
  clang-tidy/abseil/UpgradeDurationConversionsCheck.h
  docs/ReleaseNotes.rst
  docs/clang-tidy/checks/abseil-upgrade-duration-conversions.rst
  docs/clang-tidy/checks/list.rst
  test/clang-tidy/abseil-upgrade-duration-conversions.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53830.171560.patch
Type: text/x-patch
Size: 32192 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181029/eaac8620/attachment-0001.bin>


More information about the cfe-commits mailing list