[all-commits] [llvm/llvm-project] 25f5df: SemaType.cpp - use castAs<> instead of getAs<> for...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Tue Dec 8 08:38:59 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 25f5df7e0bc950ad244e8da000ce4248bd41c140
      https://github.com/llvm/llvm-project/commit/25f5df7e0bc950ad244e8da000ce4248bd41c140
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-12-08 (Tue, 08 Dec 2020)

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

  Log Message:
  -----------
  SemaType.cpp - use castAs<> instead of getAs<> for dereferenced pointers

Fix static analyzer warnings - castAs<> will assert the type is correct, but getAs<> just returns null, which would just result in a dereferenced null pointer.




More information about the All-commits mailing list