[all-commits] [llvm/llvm-project] 5fdc4d: [analyzer] refactor makeIntValWithPtrWidth, remove...

vabridgers via All-commits all-commits at lists.llvm.org
Wed Mar 23 06:27:01 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5fdc4dd7770486c0127dc5919aafea3f8ff2e61e
      https://github.com/llvm/llvm-project/commit/5fdc4dd7770486c0127dc5919aafea3f8ff2e61e
  Author: Vince Bridgers <vince.a.bridgers at gmail.com>
  Date:   2022-03-23 (Wed, 23 Mar 2022)

  Changed paths:
    M clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h
    M clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
    M clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
    M clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
    M clang/lib/StaticAnalyzer/Core/SValBuilder.cpp

  Log Message:
  -----------
  [analyzer] refactor makeIntValWithPtrWidth, remove getZeroWithPtrWidth (NFC)

This is a NFC refactoring to change makeIntValWithPtrWidth
and remove getZeroWithPtrWidth to use types when forming values to match
pointer widths. Some targets may have different pointer widths depending
upon address space, so this needs to be comprehended.

Reviewed By: steakhal

Differential Revision: https://reviews.llvm.org/D120134


  Commit: 9ef7ac51af67d08212dc69e5a932c4aa447ee9b7
      https://github.com/llvm/llvm-project/commit/9ef7ac51af67d08212dc69e5a932c4aa447ee9b7
  Author: Vince Bridgers <vince.a.bridgers at gmail.com>
  Date:   2022-03-23 (Wed, 23 Mar 2022)

  Changed paths:
    M clang/lib/StaticAnalyzer/Core/RangedConstraintManager.cpp
    A clang/test/Analysis/symbol-simplification-bo-div.c

  Log Message:
  -----------
  [analyzer] Fix crash in RangedConstraintManager.cpp

This change fixes a crash in RangedConstraintManager.cpp:assumeSym due to an
unhandled BO_Div case.

clang: <root>clang/lib/StaticAnalyzer/Core/RangedConstraintManager.cpp:51:
  virtual clang::ento::ProgramStateRef
  clang::ento::RangedConstraintManager::assumeSym(clang::ento::ProgramStateRef,
    clang::ento::SymbolRef, bool):
  Assertion `BinaryOperator::isComparisonOp(Op)' failed.

Reviewed By: NoQ

Differential Revision: https://reviews.llvm.org/D122277


Compare: https://github.com/llvm/llvm-project/compare/44a609cd594f...9ef7ac51af67


More information about the All-commits mailing list