Allows gathering fixes and applying them with clang-apply fixes.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
NIce! But please add error handling for YAML serialization and a bit more description of the new option.
clang-tidy/ClangTidy.cpp | ||
---|---|---|
374 ↗ | (On Diff #13220) | "return YAML.error();" seems like a good idea in case the file is not writable or any other error occurs. |
clang-tidy/tool/ClangTidyMain.cpp | ||
82 ↗ | (On Diff #13220) | I'd say a few more words about why we need this and how can one use this file. |
clang-tidy/ClangTidy.cpp | ||
---|---|---|
374 ↗ | (On Diff #13220) | yaml::Output has no way to retrieve errors :( |
clang-tidy/ClangTidy.cpp | ||
---|---|---|
374 ↗ | (On Diff #13220) | 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? |
clang-tidy/ClangTidy.cpp | ||
---|---|---|
374 ↗ | (On Diff #13220) | 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. |