[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
Tue Aug 9 09:30:00 PDT 2022


njames93 added inline comments.


================
Comment at: clang-tools-extra/test/clang-tidy/checkers/llvm/prefer-isa-or-dyn-cast-in-conditionals.cpp:12-13
 
 template <class X, class Y>
 bool isa(Y *);
 template <class X, class Y>
----------------
whisperity wrote:
> Will the tests pass properly once the fixes are applied, even though the replaced code refers to a symbol (`isa_and_present`) that is not declared in the TU?
The current tests would fail if ran once the fixes are applied as `isa_and_nonnull` doesn't exist in this TU. Most tidy checks (for better or worse) don't check for existence of an identifier that is expected to be there when making replacements.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131319/new/

https://reviews.llvm.org/D131319



More information about the cfe-commits mailing list