[PATCH] [clang-tidy] Add an option to export suggested fixes into a file.
Alexander Kornienko
alexfh at google.com
Thu Sep 4 07:17:00 PDT 2014
On Thu, Sep 4, 2014 at 2:07 PM, Benjamin Kramer <benny.kra at gmail.com> wrote:
> REPOSITORY
> rL LLVM
>
> ================
> Comment at: clang-tidy/ClangTidy.cpp:374
> @@ +373,3 @@
> + yaml::Output YAML(OS);
> + YAML << TUR;
> +}
> ----------------
> alexfh wrote:
> > bkramer wrote:
> > > alexfh wrote:
> > > > "return YAML.error();" seems like a good idea in case the file is
> not writable or any other error occurs.
> > > yaml::Output has no way to retrieve errors :(
> > Oh, didn't know that. In this case, you could use
> raw_fd_ostream::has_error() after manually closing it. It doesn't provide
> much detail about what was wrong, but it's better than nothing. WDYT?
> raw_ostream will report a fatal error on close anyways when anything went
> wrong (and we didn't clear the error). The only thing we could do is
> provide a nicer message, not sure if that's worth the additional code.
Ah, OK then.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140904/30d4fb18/attachment.html>
More information about the cfe-commits
mailing list