[all-commits] [llvm/llvm-project] 389bee: [clang-tidy] checkOverridingFunctionReturnType - u...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sat Feb 12 02:42:19 PST 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 389bee71ea71bf5a36e3786d3f60d3aa62e30be3
  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/bugprone/VirtualNearMissCheck.cpp

  Log Message:
  [clang-tidy] checkOverridingFunctionReturnType - use castAs<> instead of getAs<> to avoid dereference of nullptr

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

More information about the All-commits mailing list