[all-commits] [llvm/llvm-project] b6d8c8: [clang-format] Don't remove braces if a 1-statemen...

Owen via All-commits all-commits at lists.llvm.org
Thu May 12 03:54:48 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b6d8c84f28103104a5707091f970d80df423b6c9
      https://github.com/llvm/llvm-project/commit/b6d8c84f28103104a5707091f970d80df423b6c9
  Author: owenca <owenpiano at gmail.com>
  Date:   2022-05-12 (Thu, 12 May 2022)

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

  Log Message:
  -----------
  [clang-format] Don't remove braces if a 1-statement body would wrap

Reimplement the RemoveBracesLLVM feature which handles a
single-statement block that would get wrapped.

Fixes #53543.

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




More information about the All-commits mailing list