[PATCH] D120134: [analyzer] refactor makeIntValWithPtrWidth, remove getZeroWithPtrWidth (NFC)
Vince Bridgers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 22 15:40:42 PDT 2022
vabridgers marked an inline comment as done.
vabridgers added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:2570
+ State, TotalSize.castAs<DefinedOrUnknownSVal>(),
+ svalBuilder.makeIntValWithPtrWidth(Arg1->getType(), 0));
----------------
NoQ wrote:
> steakhal wrote:
> > We peobably wanted to use a different tspe for this expressuon. 'getArrayIndexType()' is a better fit IMO.
> > We shall see.
> `TotalSize` is literally `size_t` so `ASTContext.getSizeType()` is the right type. `getArrayIndexType()` is signed so it's different.
Thanks @NoQ , the review is update. Best
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120134/new/
https://reviews.llvm.org/D120134
More information about the cfe-commits
mailing list