[all-commits] [llvm/llvm-project] a8b8bd: [clang-format] Fix a bug causing BeforeLambdaBody ...

MyDeveloperDay via All-commits all-commits at lists.llvm.org
Thu Apr 30 03:12:14 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a8b8bd0f8d55856858236b36c508eb1d1f4bb6f1
      https://github.com/llvm/llvm-project/commit/a8b8bd0f8d55856858236b36c508eb1d1f4bb6f1
  Author: mydeveloperday <mydeveloperday at gmail.com>
  Date:   2020-04-30 (Thu, 30 Apr 2020)

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

  Log Message:
  -----------
  [clang-format] Fix a bug causing BeforeLambdaBody to affect brace initialiser formatting

Summary: The condition added with the new setting checked whether the character was an l-brace, not specifically a lambda l-brace, when deciding whether it was possible to break before it or not. This caused the l-brace of some initialiser lists to break onto the next line with the first argument of the initialiser list when the setting was enabled.

Reviewed By: MyDeveloperDay, Wawha

Patch By: duncan-llvm

Subscribers: cfe-commits

Tags: #clang, #clang-format

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




More information about the All-commits mailing list