jolesiak added a comment. Nice! That looks very promising.
It still fails when we pass a longer range (maybe mimicking `PreviousRBrace` will help), e.g.: Base code: @protocol A @optional // comment - (void)f; @end MACRO formatted with `clang-format -lines=3:6 file.m` gives: @protocol A @optional // comment - (void)f; @end MACRO This is not happening for Cpp, e.g.: Base code: class A { void f (); // comment void g (); }; MACRO running `clang-format -lines=3:6 file.cpp` gives: class A { void f (); // comment void g (); }; MACRO I think it would be good to add all these tests to unit tests, but I see that an interface to pass line ranges is not very pleasant. Repository: rC Clang https://reviews.llvm.org/D50535 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits