[all-commits] [llvm/llvm-project] 2901dc: Don't directly dereference getAs<> casts to avoid ...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Tue Apr 6 04:24:46 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2901dc7575873ed4bdfa1d7a0e79020e7a9ffb3d
      https://github.com/llvm/llvm-project/commit/2901dc7575873ed4bdfa1d7a0e79020e7a9ffb3d
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-04-06 (Tue, 06 Apr 2021)

  Changed paths:
    M clang/lib/AST/ExprConstant.cpp
    M clang/lib/Analysis/CalledOnceCheck.cpp
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/lib/CodeGen/CGCUDANV.cpp
    M clang/lib/CodeGen/CGExprScalar.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Sema/SemaExprMember.cpp
    M clang/lib/Sema/SemaOverload.cpp
    M clang/lib/Sema/SemaTemplateDeduction.cpp
    M clang/unittests/AST/ASTImporterTest.cpp

  Log Message:
  -----------
  Don't directly dereference getAs<> casts to avoid potential null dereferences. NFCI.

Replace with castAs<> which asserts the cast is valid.

Fixes a number of static analyzer warnings.


  Commit: b8aba76a4eab8e39008e243ebc2a3d0b56c1bd0c
      https://github.com/llvm/llvm-project/commit/b8aba76a4eab8e39008e243ebc2a3d0b56c1bd0c
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-04-06 (Tue, 06 Apr 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopFlatten.cpp

  Log Message:
  -----------
  LoopFlatten - CanWidenIV - Fix uninitialized variable warnings and use for-range loop. NFCI.

Fix static analysis uninitialized variable warnings, and use for-range loop iteration across WideIVs array.


Compare: https://github.com/llvm/llvm-project/compare/82b3e28e836d...b8aba76a4eab


More information about the All-commits mailing list