[all-commits] [llvm/llvm-project] 9acba5: [clang-tidy] FunctionASTVisitor::TraverseStmt - us...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sat Feb 12 03:04:58 PST 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9acba5206a91d735bc56ba41f18eabfc81db0513
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-02-12 (Sat, 12 Feb 2022)

  Changed paths:
    M clang-tools-extra/clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp

  Log Message:
  [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

More information about the All-commits mailing list