[cfe-dev] preventing clang tool working on same file multiple times
spsaxena via cfe-dev
cfe-dev at lists.llvm.org
Mon Sep 17 19:37:32 PDT 2018
Thanks for your response.
No, I haven't tried emitting replacements from tool and then running
clang-apply-replacement over it. Though I was trying to create a set of all
replacements.
Also seems I cannot try now, based on other response this workflow got some
bug.
Anyway, now what I think is such approach may be time taking as tool will
still need to process same files multiple times, just that the replacement
will be written/executed only once. So for a large number of files it may
take very long. right?
Btw, I am not blocked now, I followed the clang-tidy run script to run tool
on every file.
Regards,
-s
On Mon, Sep 17, 2018 at 8:04 PM Miklos Vajna <vmiklos at vmiklos.hu> wrote:
> Hi,
>
> On Sun, Sep 16, 2018 at 04:45:22PM +0800, spsaxena via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
> > So I wish to know if there is some way I can prevent the tool working on
> > same file multiple times else I will need to write a script to read the
> > compilation db and then run the tool on all files in db.
>
> Did you consider emitting replacements from your tool, then using
> clang-apply-replacements to apply them? That way the second step deals
> with de-duplication for you.
>
> Regards,
>
> Miklos
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180918/6b4a5251/attachment.html>
More information about the cfe-dev
mailing list