[all-commits] [llvm/llvm-project] 1307f6: [clang-tidy] getLambdaProperties - use cast<> inst...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Mon Jan 31 09:25:33 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1307f66d17e3b63edc27a03c3a64e46d3a7bfa61
      https://github.com/llvm/llvm-project/commit/1307f66d17e3b63edc27a03c3a64e46d3a7bfa61
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-01-31 (Mon, 31 Jan 2022)

  Changed paths:
    M clang-tools-extra/clang-tidy/modernize/AvoidBindCheck.cpp

  Log Message:
  -----------
  [clang-tidy] getLambdaProperties - use cast<> instead of dyn_cast<> to avoid dereference of nullptr

The pointers are dereferenced immediately, so assert the cast is correct instead of returning nullptr




More information about the All-commits mailing list