<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif;color:#351c75">Thanks for your response. </div><div class="gmail_default" style="font-family:georgia,serif;color:#351c75"><br></div><div class="gmail_default" style="font-family:georgia,serif;color:#351c75">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.</div><div class="gmail_default" style="font-family:georgia,serif;color:#351c75"><div class="gmail_default">Also seems I cannot try now, based on other response this workflow got some bug. </div><br class="gmail-Apple-interchange-newline"></div><div class="gmail_default" style="font-family:georgia,serif;color:#351c75">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?</div><div class="gmail_default" style="font-family:georgia,serif;color:#351c75"><br></div><div class="gmail_default" style="font-family:georgia,serif;color:#351c75">Btw, I am not blocked now, I followed the clang-tidy run script to run tool on every file. </div><div class="gmail_default" style="font-family:georgia,serif;color:#351c75"><br></div><div class="gmail_default" style="font-family:georgia,serif;color:#351c75">Regards,</div><div class="gmail_default" style="font-family:georgia,serif;color:#351c75">-s</div><div class="gmail_default" style="font-family:georgia,serif;color:#351c75"><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Sep 17, 2018 at 8:04 PM Miklos Vajna <<a href="mailto:vmiklos@vmiklos.hu">vmiklos@vmiklos.hu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
On Sun, Sep 16, 2018 at 04:45:22PM +0800, spsaxena via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br>
> So I wish to know if there is some way I can prevent the tool working on<br>
> same file multiple times else I will need to write a script to read the<br>
> compilation db and then run the tool on all files in db.<br>
<br>
Did you consider emitting replacements from your tool, then using<br>
clang-apply-replacements to apply them? That way the second step deals<br>
with de-duplication for you.<br>
<br>
Regards,<br>
<br>
Miklos<br>
</blockquote></div>