[PATCH] D11240: Add basic #include sorting functionality to clang-format
Manuel Klimek
klimek at google.com
Tue Jul 21 02:34:34 PDT 2015
klimek added inline comments.
================
Comment at: tools/clang-format/ClangFormat.cpp:277
@@ +276,3 @@
+ std::error_code EC;
+ raw_fd_ostream FileOut(FileName, EC, llvm::sys::fs::F_Text);
+ if (EC) {
----------------
djasper wrote:
> That's exactly what the rewriter does. It simply doesn't help us at all in this case. Other than writing the file atomically, it only makes our life harder.
>
> I think clang-format outputting the replacements in the order in which they need to applied makes sense and is significantly easier to integrate with than a two-phase run.
I'll need to tinker with that myself, but that's not a blocker. I'm still unhappy with the interface though. I think having a list of replacements where you can't select a single one and apply it is a very subtle interface. Have you tested this with the eclipse / visual studio integration?
http://reviews.llvm.org/D11240
More information about the cfe-commits
mailing list