[all-commits] [llvm/llvm-project] 54b291: Fix "pointer is null" static analyzer warnings. NFCI.

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sun Jan 12 14:09:18 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 54b2914accb4f5c9b58305fd6da405d20a47c452
      https://github.com/llvm/llvm-project/commit/54b2914accb4f5c9b58305fd6da405d20a47c452
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-01-12 (Sun, 12 Jan 2020)

  Changed paths:
    M clang/lib/AST/VTableBuilder.cpp

  Log Message:
  -----------
  Fix "pointer is null" static analyzer warnings. NFCI.

Use castAs<> instead of getAs<> since the pointers are dereferenced immediately and castAs will perform the null assertion for us.




More information about the All-commits mailing list