[PATCH] D36851: [analyzer] Fix modeling of ctors

2017-08-18 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311182: [analyzer] Fix modeling of constructors (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D36851?vs=111622=111711#toc Repository: rL LLVM

[PATCH] D36851: [analyzer] Fix modeling of ctors

2017-08-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Yeah, thanks! After the FIXME about record layout is addressed, i guess the next action item is to make sure the trivial constructor for the empty base is not evaluated conservatively (doh!).

[PATCH] D36851: [analyzer] Fix modeling of ctors

2017-08-18 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 111622. alexshap added a comment. Skip the default binding for empty bases. Repository: rL LLVM https://reviews.llvm.org/D36851 Files: lib/StaticAnalyzer/Core/RegionStore.cpp test/Analysis/ctor.mm Index: test/Analysis/ctor.mm

[PATCH] D36851: [analyzer] Fix modeling of ctors

2017-08-17 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. >One alternative we discussed was performing this logic in RegionStore instead and skipping the default binding there >if we saw that the base region was empty. What do you think of that approach? (We would have to be careful for exactly the reasons described in

[PATCH] D36851: [analyzer] Fix modeling of ctors

2017-08-17 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. Thanks for the patch! @NoQ and I were discussing this approach this morning. One alternative we discussed was performing this logic in RegionStore instead and skipping the default binding there if we saw that the base region was empty. What do you think of that

[PATCH] D36851: [analyzer] Fix modeling of ctors

2017-08-17 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. Herald added a subscriber: xazax.hun. This diff attempts to fixe analyzer's crash (triggered assert) on the newly added test case. The assert being discussed is assert(!B.lookup(R, BindingKey::Direct)) in lib/StaticAnalyzer/Core/RegionStore.cpp, however the root