[PATCH] D32733: [clang-format] Convert AlignEscapedNewlinesLeft to an enum, adding DontAlign

Daniel Jasper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 1 23:43:34 PDT 2017


djasper added inline comments.


================
Comment at: lib/Format/WhitespaceManager.cpp:523
+      if (C.NewlinesBefore > 0 && C.ContinuesPPDirective)
+        C.EscapedNewlineColumn = C.PreviousEndOfTokenColumn + 2;
+    return;
----------------
I think we should not duplicate this loop. Two alternatives:
1. Move this into the other loop. As long as you reset StartOfMacro in each iteration, it should do the right thing.
2. Make this work if we just return here. In theory, the "\" should not need any special-casing with this style.

I'd prefer #2.


https://reviews.llvm.org/D32733





More information about the cfe-commits mailing list