[PATCH] D94500: Rework Whitesmiths mode to use line-level values in UnwrappedLineParser

Tim Wojtulewicz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 12 08:09:45 PST 2021


timwoj created this revision.
timwoj requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94500

Files:
  clang/lib/Format/Format.cpp
  clang/lib/Format/TokenAnalyzer.cpp
  clang/lib/Format/UnwrappedLineFormatter.cpp
  clang/lib/Format/UnwrappedLineParser.cpp
  clang/lib/Format/UnwrappedLineParser.h
  clang/unittests/Format/FormatTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94500.316099.patch
Type: text/x-patch
Size: 10978 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210112/cece8963/attachment.bin>


More information about the cfe-commits mailing list