[cfe-dev] preventing clang tool working on same file multiple times

Miklos Vajna via cfe-dev cfe-dev at lists.llvm.org
Mon Sep 17 05:04:34 PDT 2018


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 --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: Digital signature
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180917/63d6524b/attachment.sig>


More information about the cfe-dev mailing list