[clang-tidy] FunctionASTVisitor::TraverseStmt - use cast<> instead of dyn_cast<>...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 12 Feb 2022 11:04:20 +0000 (11:04 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 12 Feb 2022 11:04:20 +0000 (11:04 +0000)
commit9acba5206a91d735bc56ba41f18eabfc81db0513
tree95d2fc90b0ddb62c1e71ea3238994793335c6841
parented5d659038362d6ccfebad3d9b7e10e73e681196
[clang-tidy] FunctionASTVisitor::TraverseStmt - 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/FunctionCognitiveComplexityCheck.cpp