[PATCH] D69000: [clang-tidy] new check: modernize-deprecated-iterator-base

Nikita Kniazev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 15 10:48:44 PDT 2019


nick created this revision.
nick added a reviewer: alexfh.
nick added a project: clang-tools-extra.
Herald added subscribers: cfe-commits, kristof.beyls, xazax.hun, mgorny.
Herald added a project: clang.

Finds deprecated in C++17 inheritance from `std::iterator` and replaces it with type aliases. The check itself is not marked as C++17 because it could be applied to any project with no harm.

---

Because of need to catch `CXXBaseSpecifier` I extended `clang::ast_type_traits`, but locally and in a hacky way. I would be glad if someone who knows `ASTMatcher` internals do add a proper `CXXBaseSpecifier` support.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D69000

Files:
  clang-tools-extra/clang-tidy/modernize/CMakeLists.txt
  clang-tools-extra/clang-tidy/modernize/DeprecatedIteratorBaseCheck.cpp
  clang-tools-extra/clang-tidy/modernize/DeprecatedIteratorBaseCheck.h
  clang-tools-extra/clang-tidy/modernize/ModernizeTidyModule.cpp
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/checks/list.rst
  clang-tools-extra/docs/clang-tidy/checks/modernize-deprecated-iterator-base.rst
  clang-tools-extra/test/clang-tidy/checkers/modernize-deprecated-iterator-base.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69000.225067.patch
Type: text/x-patch
Size: 31217 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191015/00c2aa0f/attachment-0001.bin>


More information about the cfe-commits mailing list