[PATCH] D131319: [clang-tidy] Update llvm-prefer-isa-or-dyn-cast-in-conditionals with new syntax

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 6 02:30:30 PDT 2022


njames93 created this revision.
njames93 added reviewers: alexfh, aaron.ballman, LegalizeAdulthood, JonasToth, bzcheeseman.
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.

In D123901 <https://reviews.llvm.org/D123901>, the `or_null`, `and_nonnull` templates were deprecated intended to be replaced with `if_present` and `and_present`.
In light of this, The clang-tidy check that enforces correct use of `isa` and `dyn_cast` should also be updated with this syntax.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131319

Files:
  clang-tools-extra/clang-tidy/llvm/PreferIsaOrDynCastInConditionalsCheck.cpp
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/checks/llvm/prefer-isa-or-dyn-cast-in-conditionals.rst
  clang-tools-extra/test/clang-tidy/checkers/llvm/prefer-isa-or-dyn-cast-in-conditionals.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131319.450503.patch
Type: text/x-patch
Size: 6238 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220806/ba830b69/attachment-0001.bin>


More information about the cfe-commits mailing list