[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 15 14:02:02 PDT 2019


hintonda marked an inline comment as done.
hintonda added a comment.

In D59802#1467363 <https://reviews.llvm.org/D59802#1467363>, @aaron.ballman wrote:

> LGTM aside from a nit and the ultimate name for the `isa_and_nonnull<>` API.


Thanks.  I'll ping the list again at the end of the week, then make whatever change is necessary.

Btw, the current iteration replaces all `v && isa<T>(v)` instances with `isa_and_nonnull<T>(v)`.  Is that still okay, or should it just do method calls?



================
Comment at: clang-tools-extra/clang-tidy/llvm/LLVMTidyModule.cpp:27-28
     CheckFactories.registerCheck<IncludeOrderCheck>("llvm-include-order");
+    CheckFactories.registerCheck<PreferIsaOrDynCastInConditionalsCheck>(
+        "llvm-prefer-isa-or-dyn-cast-in-conditionals");
     CheckFactories.registerCheck<readability::NamespaceCommentCheck>(
----------------
aaron.ballman wrote:
> Please keep this list sorted alphabetically.
I think this is where add_new_check.py put it, but I'll alphabetize.


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