[PATCH] D62638: [analyzer] A Python script to prettify the ExplodedGraph dumps.
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 31 16:51:27 PDT 2019
NoQ marked an inline comment as done.
NoQ added inline comments.
================
Comment at: clang/utils/analyzer/exploded-graph-rewriter.py:191
+ .replace('\\>', '\\\\>') \
+ .rstrip(',')
+ logging.debug(raw_json)
----------------
Charusso wrote:
> NoQ wrote:
> > Charusso wrote:
> > > NoQ wrote:
> > > > Charusso wrote:
> > > > > I have removed the trailing `,` from the end yesterday so `rstrip(',')` is not needed.
> > > > >
> > > > > It would be cool to name the `result[]`, like: `pred_id = result[1]` and `succ_id = result[2]` or current/previous ID, or something like that.
> > > > >
> > > > > I also would put the regexes into a function and you could write:
> > > > > `pred_id, succ_id = parse_edge()` or something more simpler.
> > > > >
> > > > > What is `result[0]` btw? That confused me a little-bit.
> > > > > `pred_id, succ_id = parse_edge()`
> > > >
> > > > Not really, i'd also have to return whether the match was successful, which kinda makes it as bad as before.
> > > >
> > > > > What is `result[0]` btw? That confused me a little-bit.
> > > >
> > > > That's the entire match. https://docs.python.org/3/library/re.html#match-objects
> > > I see, just I am that newbie. Thanks!
> > > I have removed the trailing `,` from the end yesterday so `rstrip(',')` is not needed.
> >
> > It still seems to be there for all nodes except the last node.
> >
> >
> Hm, that is why your testing idea is so cool, I am nearly sure I have removed it.
//*politely refuses to take credit for inventing test-driven development*//
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62638/new/
https://reviews.llvm.org/D62638
More information about the cfe-commits
mailing list