[all-commits] [llvm/llvm-project] c7d7ac: [clang-format] Rework Whitesmiths mode to use line...

Tim Wojtulewicz via All-commits all-commits at lists.llvm.org
Tue Jun 15 11:28:42 PDT 2021


  Branch: refs/heads/release/12.x
  Home:   https://github.com/llvm/llvm-project
  Commit: c7d7ace46258b04aa4b5df08952bfebc6fc4ce94
      https://github.com/llvm/llvm-project/commit/c7d7ace46258b04aa4b5df08952bfebc6fc4ce94
  Author: Tim Wojtulewicz <timwoj at gmail.com>
  Date:   2021-06-15 (Tue, 15 Jun 2021)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Format/UnwrappedLineFormatter.cpp
    M clang/lib/Format/UnwrappedLineParser.cpp
    M clang/lib/Format/UnwrappedLineParser.h
    M clang/unittests/Format/FormatTest.cpp

  Log Message:
  -----------
  [clang-format] Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

This commit removes the old way of handling Whitesmiths mode in favor of just setting the
levels during parsing and letting the formatter handle it from there. It requires a bit of
special-casing during the parsing, but ends up a bit cleaner than before. It also removes
some of switch/case unit tests that don't really make much sense when dealing with
Whitesmiths.

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

(cherry picked from commit f7f9f94b2e2b4c714bac9036f6b73a3df42daaff)




More information about the All-commits mailing list