[PATCH] D98214: [clang-format] Fix aligning with linebreaks

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 8 12:47:38 PST 2021


HazardyKnusperkeks created this revision.
HazardyKnusperkeks added reviewers: MyDeveloperDay, curdeius, nikola.
HazardyKnusperkeks added a project: clang-format.
HazardyKnusperkeks requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Breaking a string literal or a function calls arguments with
AlignConsecutiveDeclarations or AlignConsecutiveAssignments did misalign
the contiued line. E.g.:

  void foo() {
    int myVar = 5;
    double x  = 3.14;
    auto str  = "Hello"
              "World";
  }

or

  void foo() {
    int    myVar = 5;
    double x = 3.14;
    auto   str = "Hello"
               "World";
  }


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98214

Files:
  clang/lib/Format/WhitespaceManager.cpp
  clang/unittests/Format/FormatTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98214.329112.patch
Type: text/x-patch
Size: 7426 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210308/8b6ab8c9/attachment-0001.bin>


More information about the cfe-commits mailing list