[all-commits] [llvm/llvm-project] fe8b22: [analyzer] Fix "RhsLoc and LhsLoc bitwidth must be...

vabridgers via All-commits all-commits at lists.llvm.org
Tue Mar 29 15:08:40 PDT 2022


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

  Changed paths:
    M clang/lib/StaticAnalyzer/Core/SValBuilder.cpp
    A clang/test/Analysis/addrspace-null.c

  Log Message:
  -----------
  [analyzer] Fix "RhsLoc and LhsLoc bitwidth must be same"

clang: <root>/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:727:
void assertEqualBitWidths(clang::ento::ProgramStateRef,
  clang::ento::Loc, clang::ento::Loc): Assertion `RhsBitwidth ==
  LhsBitwidth && "RhsLoc and LhsLoc bitwidth must be same!"'

This change adjusts the bitwidth of the smaller operand for an evalBinOp
as a result of a comparison operation. This can occur in the specific
case represented by the test cases for a target with different pointer
sizes.

Reviewed By: NoQ

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




More information about the All-commits mailing list