[PATCH] D155506: [clang][JumpDiagnostics] use StmtClass rather than dyn_cast chain NFC

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 17 17:18:14 PDT 2023


rjmccall added a comment.

In D155506#4508176 <https://reviews.llvm.org/D155506#4508176>, @gribozavr2 wrote:

> I'm not sure it is actually an anti-pattern. `dyn_cast` will transparently handle subclasses, should any be added in the future, but a switch wouldn't.

Yeah, I don't think we have a strong style preference either way, here, given that this can't be an exhaustive switch anyway.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155506



More information about the cfe-commits mailing list