[clang-tidy] RedundantControlFlowCheck::issueDiagnostic - use cast<> instead of dyn_c...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 12 Feb 2022 11:05:59 +0000 (11:05 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 12 Feb 2022 11:05:59 +0000 (11:05 +0000)
commit869c066ca8a4231b950b5367f90758de0c6768a3
treef13f09df4ca9455f7eb97cb14d9c5b9ff8c6eb83
parent9acba5206a91d735bc56ba41f18eabfc81db0513
[clang-tidy] RedundantControlFlowCheck::issueDiagnostic - use cast<> instead of dyn_cast<> to avoid dereference of nullptr

The pointer is referenced immediately, so assert the cast is correct instead of returning nullptr
clang-tools-extra/clang-tidy/readability/RedundantControlFlowCheck.cpp