[PATCH] D137302: [clang-tidy] Add modernize-type-traits check

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 2 16:37:36 PDT 2022


njames93 created this revision.
njames93 added reviewers: aaron.ballman, gribozavr2, alexfh.
Herald added subscribers: carlosgalvezp, xazax.hun.
Herald added a project: All.
njames93 requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

This check will look for usages of standard library type traits of the form `traits<...>::type` and `traits<...>::value` and convert them into `traits_t<...>` and `traits_v<...>` respectively.
This expands on the work in D135404 <https://reviews.llvm.org/D135404> by supporting dependent traits with no instantiations as well as types.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D137302

Files:
  clang-tools-extra/clang-tidy/modernize/CMakeLists.txt
  clang-tools-extra/clang-tidy/modernize/ModernizeTidyModule.cpp
  clang-tools-extra/clang-tidy/modernize/TypeTraitsCheck.cpp
  clang-tools-extra/clang-tidy/modernize/TypeTraitsCheck.h
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/checks/list.rst
  clang-tools-extra/docs/clang-tidy/checks/modernize/type-traits.rst
  clang-tools-extra/test/clang-tidy/checkers/modernize/type-traits.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137302.472805.patch
Type: text/x-patch
Size: 18268 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221102/cf6820a8/attachment-0001.bin>


More information about the cfe-commits mailing list