[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth (NFC)

2022-03-22 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG985888411da9: [analyzer] Refactor makeNull to makeNullWithWidth (NFC) (authored by vabridgers, committed by einvbri ). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth (NFC)

2022-03-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. All clear now. Amazing, thank you for your detailed response, I've corrected my understanding of address spaces so I'll be able to understand future patches better. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth (NFC)

2022-03-19 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:378 +type = type->isReferenceType() + ? Context.getPointerType(type->getPointeeType()) + : type; vabridgers wrote: >

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth (NFC)

2022-03-19 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers updated this revision to Diff 416735. vabridgers marked an inline comment as not done. vabridgers added a comment. add updated test cases per comments from NoQ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119601/new/ https://reviews.llv

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth (NFC)

2022-03-19 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:378 +type = type->isReferenceType() + ? Context.getPointerType(type->getPointeeType()) + : type; NoQ wrote: > vabrid

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth (NFC)

2022-03-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:378 +type = type->isReferenceType() + ? Context.getPointerType(type->getPointeeType()) + : type; vabridgers wrote: > NoQ wr

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth (NFC)

2022-03-18 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:378 +type = type->isReferenceType() + ? Context.getPointerType(type->getPointeeType()) + : type; NoQ wrote: > How do

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth (NFC)

2022-03-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:378 +type = type->isReferenceType() + ? Context.getPointerType(type->getPointeeType()) + : type; How do you discover the po

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth (NFC)

2022-03-06 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Land it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119601/new/ https://reviews.llvm.org/D119601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth (NFC)

2022-03-04 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers added a comment. Is it ok to land this change? Or shall we continue to wait on @NoQ ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119601/new/ https://reviews.llvm.org/D119601 ___ cfe-commits

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth (NFC)

2022-03-01 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers marked an inline comment as done. vabridgers added a comment. Herald added a project: All. @NoQ - ping! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119601/new/ https://reviews.llvm.org/D119601 _

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth (NFC)

2022-02-23 Thread Balázs Benics via Phabricator via cfe-commits
steakhal accepted this revision. steakhal added a comment. This revision is now accepted and ready to land. I'm satisfied. I cannot see any issues. AFAI remember the tests runs uncovered no report changes - as expected from an NFC change. So it's good to go on my part. Wait for a review from @NoQ

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth (NFC)

2022-02-18 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers marked an inline comment as done. vabridgers added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:372 - Loc makeNull() { -return loc::ConcreteInt(BasicVals.getZeroWithPtrWidth()); } steakhal wr

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth (NFC)

2022-02-18 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers updated this revision to Diff 409896. vabridgers added a comment. refactor based on @steakhal comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119601/new/ https://reviews.llvm.org/D119601 Files: clang/include/clang/StaticAnalyze

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth (NFC)

2022-02-18 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:368 Loc makeNullWithType(QualType type) { -return loc::ConcreteInt(BasicVals.getZeroWithTypeSize(type)); - } - - Loc makeNull() { -return loc::ConcreteInt

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth

2022-02-17 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers marked 5 inline comments as done. vabridgers added a comment. I believe I've addressed all of Artem's comments thus far. This is a NFC patch, so will include no test cases. We detected these inconsistencies in getting NULL pointers in our downstream target, that supports 2 different p

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth

2022-02-17 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers updated this revision to Diff 409750. vabridgers added a comment. Address NoQ comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119601/new/ https://reviews.llvm.org/D119601 Files: clang/include/clang/StaticAnalyzer/Core/PathSensi

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth

2022-02-13 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers added a comment. I explored some test cases, and the rabbit hole gets deeper :) Continuing to explore. Best Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119601/new/ https://reviews.llvm.org/D119601 ___

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth

2022-02-13 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers added a comment. In D119601#3317317 , @NoQ wrote: >> steakhal performed systems testing across a large set of open source >> projects. > > I'm curious if any findings there caused you to make changes in the patch. If > so it'd be great to red

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth

2022-02-13 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers added a comment. Thanks for the comments. I'll address and revert back soon. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119601/new/ https://reviews.llvm.org/D119601 ___ cfe-commits mailing

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth

2022-02-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > steakhal performed systems testing across a large set of open source projects. I'm curious if any findings there caused you to make changes in the patch. If so it'd be great to reduce them into test cases so that other people didn't make the same mistake when they edit yo

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth

2022-02-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp:645-646 - auto ValueToUpdate = C.getSValBuilder().makeNull(); + auto ValueToUpdate = C.getSValBuilder().makeNullWithType( + IC->getCXXThisVal().getType(C.getASTContext())); S

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth

2022-02-11 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers created this revision. vabridgers added reviewers: NoQ, martong. Herald added subscribers: manas, steakhal, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun. vabridgers requested review of this revision. Herald ad