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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to