[all-commits] [llvm/llvm-project] 672586: Sema::BuildCallExpr - use cast<> instead of dyn_ca...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Tue Jan 5 01:39:19 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6725860d21a03741d6c3331ab0560416bb19e068
      https://github.com/llvm/llvm-project/commit/6725860d21a03741d6c3331ab0560416bb19e068
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-01-05 (Tue, 05 Jan 2021)

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

  Log Message:
  -----------
  Sema::BuildCallExpr - use cast<> instead of dyn_cast<> for dereferenced pointer. NFCI.

We're immediately dereferencing the casted pointer, so use cast<> which will assert instead of dyn_cast<> which can return null.

Fixes static analyzer warning.


  Commit: 52e448974b2ec826c8af429c370c4d6e79ce5747
      https://github.com/llvm/llvm-project/commit/52e448974b2ec826c8af429c370c4d6e79ce5747
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-01-05 (Tue, 05 Jan 2021)

  Changed paths:
    M llvm/lib/Target/SystemZ/SystemZISelLowering.cpp

  Log Message:
  -----------
  SystemZTargetLowering::lowerDYNAMIC_STACKALLOC - use cast<> instead of dyn_cast<> for dereferenced pointer. NFCI.

We're immediately dereferencing the casted pointer, so use cast<> which will assert instead of dyn_cast<> which can return null.

Fixes static analyzer warning.


  Commit: 84d5768d97635602225f5056da96b058e588b2f5
      https://github.com/llvm/llvm-project/commit/84d5768d97635602225f5056da96b058e588b2f5
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-01-05 (Tue, 05 Jan 2021)

  Changed paths:
    M llvm/lib/Transforms/Instrumentation/MemProfiler.cpp

  Log Message:
  -----------
  MemProfiler::insertDynamicShadowAtFunctionEntry - use cast<> instead of dyn_cast<> for dereferenced pointer. NFCI.

We're immediately dereferencing the casted pointer, so use cast<> which will assert instead of dyn_cast<> which can return null.

Fixes static analyzer warning.


Compare: https://github.com/llvm/llvm-project/compare/1d4411e9ea0e...84d5768d9763


More information about the All-commits mailing list