[all-commits] [llvm/llvm-project] 3d209c: [clang-format] Constructor initializer lists forma...

MyDeveloperDay via All-commits all-commits at lists.llvm.org
Sat Oct 2 05:24:03 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3d209c76ddb56db73def474450532813e39d95fa
      https://github.com/llvm/llvm-project/commit/3d209c76ddb56db73def474450532813e39d95fa
  Author: Josh Learn <joshua_learn at apple.com>
  Date:   2021-10-02 (Sat, 02 Oct 2021)

  Changed paths:
    M clang/lib/Format/UnwrappedLineParser.cpp
    M clang/unittests/Format/FormatTest.cpp

  Log Message:
  -----------
  [clang-format] Constructor initializer lists format with pp directives

Currently constructor initializer lists sometimes format incorrectly
when there is a preprocessor directive in the middle of the list.
This patch fixes the issue when parsing the initilizer list by
ignoring the preprocessor directive when checking if a block is
part of an initializer list.

rdar://82554274

Reviewed By: MyDeveloperDay, HazardyKnusperkeks

Differential Revision: https://reviews.llvm.org/D109951




More information about the All-commits mailing list