aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/Object.cpp
diff options
context:
space:
mode:
authorDonĂ¡t Nagy <donat.nagy@ericsson.com>2025-08-01 16:39:56 +0200
committerGitHub <noreply@github.com>2025-08-01 16:39:56 +0200
commitbe03d257cdc29172a7b4b35f85d3242fddba1d43 (patch)
tree21d5989b7501a5f4c5b05694e5a149efd8e34038 /llvm/lib/Object/Object.cpp
parent6b7a8e9015fad3f73b37e517d9189cbf98feb5d1 (diff)
downloadllvm-be03d257cdc29172a7b4b35f85d3242fddba1d43.zip
llvm-be03d257cdc29172a7b4b35f85d3242fddba1d43.tar.gz
llvm-be03d257cdc29172a7b4b35f85d3242fddba1d43.tar.bz2
[analyzer] Retain address space information in getElementRegion (#151370)
The factory method `MemRegionManager::getElementRegion()` is the main way of constructing `ElementRegion` objects, which are widespread in the analysis and may represent array elements (as lvalues), pointer arithmetic and type conversions. This factory method used to strip all qualifiers from the type associated with the element (after canonicalizing it), but the address space qualifier can affect the size of a pointer type, so stripping it caused an assertion failure (in `evalBinOpLL`): clang: clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:785: void assertEqualBitWidths(clang::ento::ProgramStateRef, clang::ento::Loc, clang::ento::Loc): Assertion `RhsBitwidth == LhsBitwidth && "RhsLoc and LhsLoc bitwidth must be same!"' failed. --------- Co-authored-by: Vince Bridgers <vince.a.bridgers@ericsson.com>
Diffstat (limited to 'llvm/lib/Object/Object.cpp')
0 files changed, 0 insertions, 0 deletions