Re: [PATCH v2 6/9] gen_compile_commands: move directory walk to a generator function

2020-08-21 Thread Masahiro Yamada
On Sat, Aug 22, 2020 at 9:41 AM 'Nick Desaulniers' via Clang Built Linux wrote: > > +for path in paths: > > +cmdfiles = cmdfiles_in_dir(path) > > + > > +for cmdfile in cmdfiles: > > If `cmdfiles` is never referenced again, please make this: > > for cmdfile in cmdfiles_in_dir(p

Re: [PATCH v2 6/9] gen_compile_commands: move directory walk to a generator function

2020-08-21 Thread Nick Desaulniers
On Fri, Aug 21, 2020 at 12:02 PM Masahiro Yamada wrote: > > Currently, this script walks under the specified directory (default to > the current directory), then parses all .cmd files found. > > Split it into a separate helper function because the next commit will > add more helpers to pick up .cm

[PATCH v2 6/9] gen_compile_commands: move directory walk to a generator function

2020-08-21 Thread Masahiro Yamada
Currently, this script walks under the specified directory (default to the current directory), then parses all .cmd files found. Split it into a separate helper function because the next commit will add more helpers to pick up .cmd files associated with given file(s). There is no point to build a