[all-commits] [llvm/llvm-project] 869c06: [clang-tidy] RedundantControlFlowCheck::issueDiagn...

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


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 869c066ca8a4231b950b5367f90758de0c6768a3
      https://github.com/llvm/llvm-project/commit/869c066ca8a4231b950b5367f90758de0c6768a3
  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/RedundantControlFlowCheck.cpp

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




More information about the All-commits mailing list