[all-commits] [llvm/llvm-project] 6c8ded: [TableGen] Don't dereference from dyn_cast<> - use...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Mon Dec 14 04:17:20 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6c8ded0d8c3c256defaf72c0596614eea465ca27
      https://github.com/llvm/llvm-project/commit/6c8ded0d8c3c256defaf72c0596614eea465ca27
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-12-14 (Mon, 14 Dec 2020)

  Changed paths:
    M llvm/lib/TableGen/Record.cpp

  Log Message:
  -----------
  [TableGen] Don't dereference from dyn_cast<> - use cast<> instead. NFCI.

dyn_cast<> can return null if the cast fails, resulting in null dereferences and static analyzer warnings. We should use cast<> instead.




More information about the All-commits mailing list