[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
Thu Apr 11 16:10:35 PDT 2019


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


================
Comment at: clang-tools-extra/clang-tidy/llvm/PreferIsaOrDynCastInConditionalsCheck.h:37-39
+///  if (var && isa<T>(var)) {}
+///  // is replaced by:
+///  if (dyn_cast_or_null<T>(var.foo())) {}
----------------
aaron.ballman wrote:
> I think this comment is now out of date.
Thanks, I'll fix that.  

I'll give the RFC a few more days, but not sure it's been definitive.  A few no votes, but there are always some of those.  I sorta like `isa_nonnull<T>` for brevity, so I'll mention that why I follow-up on that thread.  Btw, the `isa_and_nonnull<T>` has been in for a week: r357761, and nothing on that thread leads me to believe I should revert it.


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