[all-commits] [llvm/llvm-project] 06e973: [CGExpr] Use castAs<> instead of getAs<> to avoid ...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sat Jan 8 06:30:27 PST 2022


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

  Changed paths:
    M clang/lib/CodeGen/CGExpr.cpp

  Log Message:
  -----------
  [CGExpr] Use castAs<> instead of getAs<> to avoid dereference of nullptr

This will assert the cast is correct instead of returning nullptr


  Commit: be7dbd674cb0cec2558e054c39be0eb098a99394
      https://github.com/llvm/llvm-project/commit/be7dbd674cb0cec2558e054c39be0eb098a99394
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-01-08 (Sat, 08 Jan 2022)

  Changed paths:
    M llvm/lib/Analysis/DivergenceAnalysis.cpp

  Log Message:
  -----------
  [DivergenceAnalysis] Simplify inRegion test based on whether the RegionLoop pointer is null or not

More closely matches the documentation

Requested by @nikic


Compare: https://github.com/llvm/llvm-project/compare/b3f193a980f2...be7dbd674cb0


More information about the All-commits mailing list