[PATCH] D124943: [clang][dataflow] Add flowConditionIsTautology function

2022-05-04 Thread Eric Li via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG58abe36ae765: [clang][dataflow] Add flowConditionIsTautology function (authored by li.zhe.hua). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D124943: [clang][dataflow] Add flowConditionIsTautology function

2022-05-04 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua marked 4 inline comments as done. li.zhe.hua added a comment. Ah, good catch regarding the flow condition deps not being tracked. Thanks for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124943/new/ https://reviews.llvm.org/

[PATCH] D124943: [clang][dataflow] Add flowConditionIsTautology function

2022-05-04 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua updated this revision to Diff 427183. li.zhe.hua added a comment. Address reviewer comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124943/new/ https://reviews.llvm.org/D124943 Files: clang/include/clang/Analysis/FlowSensitive/

[PATCH] D124943: [clang][dataflow] Add flowConditionIsTautology function

2022-05-04 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua added a comment. I'm playing around with a tool to take raw pointers and add a non-null annotation or convert them to references, for code that is assumed to be correct. So in this case, "interesting expression" is anything that would be UB if the pointer was null, e.g. dereferencing

[PATCH] D124943: [clang][dataflow] Add flowConditionIsTautology function

2022-05-04 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev accepted this revision. sgatev added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:176-177 + /// Returns true if the constraints of the flow condition identified by + /// `Token` is always true. + bool flowCondition

[PATCH] D124943: [clang][dataflow] Add flowConditionIsTautology function

2022-05-04 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. The code looks good to me too. I was also wondering what sort of check will need this info. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D124943: [clang][dataflow] Add flowConditionIsTautology function

2022-05-04 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua added a comment. This allows me to query when an expression is always encountered/executed. Alternatively, if I have a set of interesting expressions, I can note the flow condition at every expression, compute the disjunction of the set of flow conditions, and determine if execution

[PATCH] D124943: [clang][dataflow] Add flowConditionIsTautology function

2022-05-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. The code looks good, but what is the intended application? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124943/new/ https://reviews.llvm.org/D124943 ___ cfe-commits mailing list

[PATCH] D124943: [clang][dataflow] Add flowConditionIsTautology function

2022-05-04 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua created this revision. li.zhe.hua added reviewers: ymandel, sgatev, xazax.hun. Herald added subscribers: tschuett, steakhal, rnkovacs. Herald added a project: All. li.zhe.hua requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Provid