[PATCH] D92639: [analyzer] Add control flow arrows to the analyzer's HTML reports
Ella Ma via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 4 01:48:33 PST 2020
OikawaKirie added a comment.
It is really a good idea!
The operations that would not leave an event in the report are now clearly printed.
But there are three arrows that confuse me in the example report: the assignment `x = 0` (x -> 0 -> x), the function call `dereference(x)` (x -> dereference), and the return statement `return *x` (int -> *x). I know the arrow is based on the evaluation order of the engine. But from the view of a user, I think these arrows are confusing to some extent.
For the first two, I think it would be better to point just the statement (maybe a `CFGElement`) without inner arrows (x -> 0 -> x and x -> dereference), or point to the location of the operator itself rather than the BeginLoc (e.g. x -> 0 -> =). For the third one, an arrow from the function name to the first `CFGElement` looks good to me. And an arrow from the returned expr to the return type or to a special mark (e.g. ⬅️) can also be added, together with function calls (an arrow from the callstmt to a special mark, e.g. ➡️).
By the way, what do you think about adding arrows for data flows of specific symbolic values in the future?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92639/new/
https://reviews.llvm.org/D92639
More information about the cfe-commits
mailing list