[PATCH] D64991: [analyzer][WIP] Implement a primitive reaching definitions analysis

2020-03-16 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 250517. Szelethus edited the summary of this revision. Szelethus added a comment. Upload final version. This revision stays here for archaeological purposes, as I'll split this up into manageable pieces. CHANGES SINCE LAST ACTION

[PATCH] D64991: [analyzer][WIP] Implement a primitive reaching definitions analysis

2019-09-30 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 222514. Szelethus added a comment. I'm starting to be really happy with the current direction! I think I'll start splitting this up soon, I'm confident that the current interface (after some polishing) is general enough to develop incrementally. -

[PATCH] D64991: [analyzer][WIP] Implement a primitive reaching definitions analysis

2019-09-23 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 221355. Szelethus added a comment. The following words are echoing in my ears as I'm knowingly going completely against them: In D45532#1083670 , @NoQ wrote: > I'm asking for this because it's, like, actually

[PATCH] D64991: [analyzer][WIP] Implement a primitive reaching definitions analysis

2019-09-09 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D64991#1662185 , @Szelethus wrote: > Hmm, we could make a redundant assignments checker: if a variable has > multiple reaching definitions, but those all assign the same value, emit a > warning. We could even use fixits with

[PATCH] D64991: [analyzer][WIP] Implement a primitive reaching definitions analysis

2019-09-07 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Hmm, we could make a redundant assignments checker: if a variable has multiple reaching definitions, but those all assign the same value, emit a warning. We could even use fixits with that. void t(int a) { if (coin()) a = 2; // note: reaching def else

[PATCH] D64991: [analyzer][WIP] Implement a primitive reaching definitions analysis

2019-07-29 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/include/clang/Analysis/Analyses/ReachingDefinitions.h:30 + }; + const VarDecl *Var; + CFGBlock::ConstCFGElementRef E; In the future we might also want to reason about `FieldDecl`s. Comment

[PATCH] D64991: [analyzer][WIP] Implement a primitive reaching definitions analysis

2019-07-24 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 211509. Szelethus added a comment. Use the correct sorting for the GEN, KILL, IN and OUT sets. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64991/new/ https://reviews.llvm.org/D64991 Files:

[PATCH] D64991: [analyzer][WIP] Implement a primitive reaching definitions analysis

2019-07-24 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 211457. Szelethus added a comment. Rebase on top of D65196 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64991/new/ https://reviews.llvm.org/D64991 Files:

[PATCH] D64991: [analyzer][WIP] Implement a primitive reaching definitions analysis

2019-07-23 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a reviewer: steakhal. Szelethus added a subscriber: steakhal. Szelethus added a comment. @steakhal you some great experience with (strict) aliasing, could you chip in on this maybe? :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64991/new/

[PATCH] D64991: [analyzer][WIP] Implement a primitive reaching definitions analysis

2019-07-22 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D64991#1596292 , @NoQ wrote: > In D64991#1595853 , @Szelethus wrote: > > > `CFGElementRef` > > > Wait, is it a thing already?? Did i miss anything??? Oh, yea, I have it locally,

[PATCH] D64991: [analyzer][WIP] Implement a primitive reaching definitions analysis

2019-07-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D64991#1595853 , @Szelethus wrote: > `CFGElementRef` Wait, is it a thing already?? Did i miss anything??? > This analysis isn't conservative enough yet, I really should include function > calls with non-const references into

[PATCH] D64991: [analyzer][WIP] Implement a primitive reaching definitions analysis

2019-07-22 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 29. Szelethus added a comment. I plan to split this patch up eventually, but here's where I'm standing right now: - Correct the algorithm that by accident did this: `GEN[B] = GEN[B] union (IN[B] - KILL[B])` instead of this: `OUT[B] = GEN[B] union

[PATCH] D64991: [analyzer][WIP] Implement a primitive reaching definitions analysis

2019-07-19 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, xazax.hun, baloghadamsoftware, Charusso, rnkovacs, a_sidorin, dcoughlin. Szelethus added a project: clang. Herald added subscribers: cfe-commits, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity,