[cfe-users] How to use clang-apply-replacements with clang-tidy fixit file
I used clang-tidy to generate some replacements for a code base into a yaml file using the -export-fixits=file option. After editing the file to remove some unwanted changes, I would like to apply those fixes. The documentation says to use clang-apply-replacements, but I don't see how do use it to do that. It looks more like it's designed to work with clang-format. Any suggestions? Many thanks, Robert ___ cfe-users mailing list cfe-users@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
Re: [cfe-users] How to use clang-apply-replacements with clang-tidy fixit file
On Sat, 27 Apr 2019 at 07:20, Robert Ankeney via cfe-users wrote: > > I used clang-tidy to generate some replacements for a code base into a yaml > file using the -export-fixits=file option. After editing the file to remove > some unwanted changes, I would like to apply those fixes. The documentation > says to use clang-apply-replacements, but I don't see how do use it to do > that. It looks more like it's designed to work with clang-format. Any > suggestions? > If you don't care about formatting the post-replacement code with clang format, just run "clang-apply-replacements /path/to/source/dir'. It will scan for '.yml' files, and apply all replacements. Chris > Many thanks, > Robert > > ___ > cfe-users mailing list > cfe-users@lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users ___ cfe-users mailing list cfe-users@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
Re: [cfe-users] How to use clang-apply-replacements with clang-tidy fixit file
Back on the ML., let's keep the discussion public and archived. On Sat, 27 Apr 2019 at 09:11, Christian Gagneraud wrote: > > On Sat, 27 Apr 2019 at 09:01, Robert Ankeney wrote: > > > > Hi Chris, > > > > Thanks for the fast response! As it turns out, I was doing that, but found > > that there must be some edit in my .yaml file it doesn't like, as it simply > > returned without doing anything. Making a short subset of the file worked > > fine, so I'm looking at breaking it into pieces to see if I can narrow it > > down. On the first cut, it at least did warn me about some duplicate > > replacements and exited. > > > > Feel free to submit bug report and/or suggestion: > https://llvm.org/docs/HowToSubmitABug.html > > What program do you use to generate the replacement files? > > Chris ___ cfe-users mailing list cfe-users@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users