[PATCH] Add clang-format VS extension
Manuel Klimek
klimek at google.com
Thu Aug 29 04:41:37 PDT 2013
================
Comment at: tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs:73
@@ +72,3 @@
+ var end = view.Selection.End.Position.GetContainingLine().End.Position;
+ //var offset = Math.Min(view.Selection.Start.Position.Position, text.Length-1);
+ var length = end - start;
----------------
Daniel Jasper wrote:
> Intentional?
Fixed.
================
Comment at: tools/clang-format-vs/ClangFormat/ClangFormatPackage.cs:75
@@ +74,3 @@
+ var length = end - start;
+ if (start >= text.Length && text.Length > 0)
+ start = text.Length - 1;
----------------
Daniel Jasper wrote:
> This might need a comment.
Done.
================
Comment at: tools/clang-format-vs/ClangFormat/PkgCmdID.cs:10
@@ +9,3 @@
+ public const uint cmdidClangFormat = 0x100;
+
+
----------------
Daniel Jasper wrote:
> Is this generated? Consider removing the empty lines ..
Yep, this was generated (all but ClangFormatPackage.cs are mostly IDE controlled / auto-generated files). The other thing manually edited is the .vsct file , where I added the KeyBinding.
http://llvm-reviews.chandlerc.com/D1543
More information about the cfe-commits
mailing list