[all-commits] [llvm/llvm-project] 4b4320: [clang][sema] Use castAs<> instead of getAs<> to a...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sun Feb 13 05:14:29 PST 2022

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

  Changed paths:
    M clang/lib/Sema/SemaExpr.cpp

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