Re: [PATCH] D11240: Add basic #include sorting functionality to clang-format

2015-09-22 Thread Manuel Klimek via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. Ok, I think this is now understandable enough for me to go in. http://reviews.llvm.org/D11240 ___ cfe-commits mailing list cfe-commits@lists.llvm

Re: [PATCH] D11240: Add basic #include sorting functionality to clang-format

2015-09-22 Thread Daniel Jasper via cfe-commits
djasper updated this revision to Diff 35395. djasper added a comment. Added comments and did some renaming. http://reviews.llvm.org/D11240 Files: include/clang/Format/Format.h include/clang/Tooling/Core/Replacement.h lib/Format/Format.cpp lib/Format/FormatToken.cpp lib/Tooling/Core/Re

Re: [PATCH] D11240: Add basic #include sorting functionality to clang-format

2015-09-22 Thread Manuel Klimek via cfe-commits
klimek added a comment. Sending another batch of comments. Comment at: lib/Tooling/Core/Replacement.cpp:305-307 @@ +304,5 @@ + Replacements Result; + // Iterate over both sets and always add the next element (smallest total + // Offset) from either 'First' or 'Second'. Merge

Re: [PATCH] D11240: Add basic #include sorting functionality to clang-format

2015-09-22 Thread Daniel Jasper via cfe-commits
djasper updated this revision to Diff 35375. djasper added a comment. Restructured a bit. Not as many comments just yet. Do you think this is an improvement? http://reviews.llvm.org/D11240 Files: include/clang/Format/Format.h include/clang/Tooling/Core/Replacement.h lib/Format/Format.cpp

Re: [PATCH] D11240: Add basic #include sorting functionality to clang-format

2015-09-15 Thread Daniel Jasper via cfe-commits
djasper updated this revision to Diff 34800. djasper marked 4 inline comments as done. djasper added a comment. Addressed (most) comments http://reviews.llvm.org/D11240 Files: include/clang/Format/Format.h include/clang/Tooling/Core/Replacement.h lib/Format/Format.cpp lib/Format/FormatT

Re: [PATCH] D11240: Add basic #include sorting functionality to clang-format

2015-09-15 Thread Daniel Jasper via cfe-commits
djasper marked 8 inline comments as done. Comment at: lib/Format/Format.cpp:1653 @@ +1652,3 @@ +Code.substr(Prev, (Pos != StringRef::npos ? Pos : Code.size()) - Prev); +if (!Line.endswith("\\")) { + if (IncludeRegex.match(Line, &Matches)) { klimek

Re: [PATCH] D11240: Add basic #include sorting functionality to clang-format

2015-09-14 Thread Manuel Klimek via cfe-commits
klimek added a comment. First round of comments; some things are still a bit confusing, so I hope another round will help to weed them out. Comment at: include/clang/Tooling/Core/Replacement.h:223-224 @@ -222,1 +222,4 @@ +/// \brief Merges to sets of replacements with the sec

Re: [PATCH] D11240: Add basic #include sorting functionality to clang-format

2015-09-14 Thread Daniel Jasper via cfe-commits
djasper added a comment. Ping? http://reviews.llvm.org/D11240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D11240: Add basic #include sorting functionality to clang-format

2015-09-07 Thread Daniel Jasper via cfe-commits
djasper updated the summary for this revision. djasper updated this revision to Diff 34137. djasper added a comment. Now properly implemented merging of two replacement sets that are meant to be applied in sequence. I think this functionality will also be highly useful, e.g. when formatting the

Re: [PATCH] D11240: Add basic #include sorting functionality to clang-format

2015-08-10 Thread Daniel Jasper via cfe-commits
djasper updated this revision to Diff 31670. djasper added a comment. Added an alternative way to handle the two sets of Replacements: Merge them properly. I haven't completely finished implementing / testing this. Wanted to get feedback first before going further down this road. http://revie