[PATCH] D116314: [clang-format] Add style to separate definition blocks
Björn Schäpers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 31 04:23:14 PST 2021
HazardyKnusperkeks added inline comments.
================
Comment at: clang/lib/Format/DefinitionBlockSeparator.cpp:25
+ FormatTokenLexer &Tokens) {
+ if (Style.SeparateDefinitionBlocks == FormatStyle::SDS_Leave)
+ return {{}, 0};
----------------
Better, but I still think we should have the assert here. The class should not be instantiated at all, if you don't want to use it.
================
Comment at: clang/lib/Format/DefinitionBlockSeparator.cpp:35
+ return;
+ auto likelyDefinition = [this](AnnotatedLine *Line) {
+ if (Line->MightBeFunctionDecl && Line->mightBeFunctionDefinition())
----------------
ksyx wrote:
> HazardyKnusperkeks wrote:
> >
> [[ https://github.com/llvm/llvm-project/blob/298367ee6e36eeb1b193ad9fa92082c2ef2345a3/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp#L2393 | Some other lambdas ]] I found use lowercased leading letter, as it looks like a function (call).
Okay, then I don't know what the LLVM Style is, probably there is none in this regard. I think the lambdas I saw in clang-format are with a capital letter.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116314/new/
https://reviews.llvm.org/D116314
More information about the cfe-commits
mailing list