[PATCH] D59802: [clang-tidy] Add new checker: llvm-prefer-isa-or-dyn-cast-in-conditionals

Don Hinton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 22 09:48:43 PDT 2019


hintonda added a comment.

@aaron.ballman, I just ran it over llvm/lib, including all in-tree headers, and it seems to work fine.  However, it did miss this one:

- if (V && isa<Instruction>(V) && (EntInst = cast<Instruction>(V)) &&

+        if (isa_and_nonnull<Instruction>(V) && (EntInst = cast<Instruction>(V)) &&

It got the first, but not the second.  Not sure how to pick that one up.  Even ran it a second time on just that file, but still didn't pick it up.  Any ideas?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D59802





More information about the cfe-commits mailing list