[all-commits] [llvm/llvm-project] de1597: Assert pointer cannot be null; NFC

schittir via All-commits all-commits at lists.llvm.org
Thu Aug 26 04:00:38 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: de15979bc32d761c9b5071fb7d28d7c04ebbfaf3
      https://github.com/llvm/llvm-project/commit/de15979bc32d761c9b5071fb7d28d7c04ebbfaf3
  Author: Sindhu Chittireddy <sindhu.chittireddy at intel.com>
  Date:   2021-08-26 (Thu, 26 Aug 2021)

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

  Log Message:
  -----------
  Assert pointer cannot be null; NFC

Klocwork static code analysis exposed this concern:
Pointer 'SubExpr' returned from call to getSubExpr() function which may
return NULL from 'cast_or_null<Expr>(Operand)', which will be
dereferenced in the statement following it

Add an assert on SubExpr to make it clear this pointer cannot be null.




More information about the All-commits mailing list