[all-commits] [llvm/llvm-project] df2a6e: [Sema] Use castAs<> instead getAs<> for dereferenc...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Thu Mar 11 06:51:46 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: df2a6ee3247c9d00b42c14ea924fd25cc45bda87
      https://github.com/llvm/llvm-project/commit/df2a6ee3247c9d00b42c14ea924fd25cc45bda87
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-03-11 (Thu, 11 Mar 2021)

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

  Log Message:
  -----------
  [Sema] Use castAs<> instead getAs<> for dereferenced pointer casts. NFCI.

getAs<> returns null for missed casts, resulting in null dereferences - use castAs<> instead which will assert the cast is correct.




More information about the All-commits mailing list