[PATCH] D66593: [analyzer] CastValueChecker: Fix some assertions

2019-08-23 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D66593#1642253 , @Charusso wrote: > Wow, it is great you could address every of the edge cases. Thanks you so > much! I believe only one problem left: we need to `return false` instead of > plain `return` in order to let the

[PATCH] D66593: [analyzer] CastValueChecker: Fix some assertions

2019-08-22 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso abandoned this revision. Charusso marked 4 inline comments as done. Charusso added a comment. Wow, it is great you could address every of the edge cases. Thanks you so much! I believe only one problem left: we need to `return false` instead of plain `return` in order to let the

[PATCH] D66593: [analyzer] CastValueChecker: Fix some assertions

2019-08-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Pushed my own emergency hotfixes as rC369726 , rC369727 , rC369728 , rC369729 ; reduced tests included. CHANGES SINCE LAST ACTION

[PATCH] D66593: [analyzer] CastValueChecker: Fix some assertions

2019-08-22 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/CallEvent.cpp:743-750 + QualType RegionType = DynType.getType(); + if (RegionType->isPointerType()) +RegionType = RegionType->getPointeeType(); + else +RegionType =

[PATCH] D66593: [analyzer] CastValueChecker: Fix some assertions

2019-08-22 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 216737. Charusso marked 2 inline comments as done. Charusso added a comment. - The null `MemRegion` is a `0 (Loc)`, try to avoid to store it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66593/new/ https://reviews.llvm.org/D66593 Files:

[PATCH] D66593: [analyzer] CastValueChecker: Fix some assertions

2019-08-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. These assertions are fundamental, so we can't remove them; i believe we messed up modeling at some point. I'll pick this up to address some nasty regressions quickly; i managed to reproduce the crashes and i already have 4 creduces running. Comment at:

[PATCH] D66593: [analyzer] CastValueChecker: Fix some assertions

2019-08-22 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso marked an inline comment as done. Charusso added a comment. I am not sure how would I fix them, so I just commented them out. Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:102 + else if (Ty->isReferenceType()) Ty = Ty.getNonReferenceType();

[PATCH] D66593: [analyzer] CastValueChecker: Fix some assertions

2019-08-22 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso created this revision. Charusso added a reviewer: NoQ. Charusso added a project: clang. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. - Repository: rC Clang https://reviews.llvm.org/D66593