[PATCH] D11235: clang-format: Fix breaking before nested 'operator' in function declarations

Daniel Jasper djasper at google.com
Wed Jul 15 12:58:25 PDT 2015


djasper accepted this revision.
djasper added a comment.
This revision is now accepted and ready to land.

One remark, otherwise looks good!


================
Comment at: lib/Format/ContinuationIndenter.cpp:602
@@ -601,1 +601,3 @@
+        (NextNonComment->is(tok::kw_operator) &&
+         !NextNonComment->Previous->is(tok::coloncolon)))))
     return std::max(State.Stack.back().LastSpace, State.Stack.back().Indent);
----------------
Is NextNonComment->Previous != Current? (Except for the fact that NextNonComment->Previous could be a comment in:

  void SomeType:: // whyever someone would put a comment here
      operator+() { ...


http://reviews.llvm.org/D11235







More information about the cfe-commits mailing list