[all-commits] [llvm/llvm-project] 36622c: [clang-format] Fix AllowShortFunctionsOnASingleLin...
Marek Kurdej via All-commits
all-commits at lists.llvm.org
Thu Jan 27 09:06:49 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 36622c4e1a48cd02209524592abb9d929fff1e22
https://github.com/llvm/llvm-project/commit/36622c4e1a48cd02209524592abb9d929fff1e22
Author: Marek Kurdej <marek.kurdej+llvm.org at gmail.com>
Date: 2022-01-27 (Thu, 27 Jan 2022)
Changed paths:
M clang/lib/Format/FormatToken.h
M clang/lib/Format/TokenAnnotator.cpp
M clang/lib/Format/UnwrappedLineFormatter.cpp
M clang/lib/Format/UnwrappedLineParser.cpp
M clang/unittests/Format/FormatTest.cpp
M clang/unittests/Format/TokenAnnotatorTest.cpp
Log Message:
-----------
[clang-format] Fix AllowShortFunctionsOnASingleLine: InlineOnly with wrapping after record.
Fixes https://github.com/llvm/llvm-project/issues/53430.
Initially, I had a quick and dirty approach, but it led to a myriad of special cases handling comments (that may add unwrapped lines).
So I added TT_RecordLBrace type annotations and it seems like a much nicer solution.
I think that in the future it will allow us to clean up some convoluted code that detects records.
Reviewed By: MyDeveloperDay, HazardyKnusperkeks
Differential Revision: https://reviews.llvm.org/D118337
More information about the All-commits
mailing list