[clang] [clang-format] Separate License text and include blocks (PR #77918)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 13 02:52:07 PST 2024
================
@@ -65,18 +81,18 @@ void DefinitionBlockSeparator::separateBlocks(
}
return false;
};
- unsigned NewlineCount =
- (Style.SeparateDefinitionBlocks == FormatStyle::SDS_Always ? 1 : 0) + 1;
+ unsigned NewlineCount = getNewlineCount(Style.SeparateDefinitionBlocks);
WhitespaceManager Whitespaces(
Env.getSourceManager(), Style,
Style.LineEnding > FormatStyle::LE_CRLF
? WhitespaceManager::inputUsesCRLF(
Env.getSourceManager().getBufferData(Env.getFileID()),
Style.LineEnding == FormatStyle::LE_DeriveCRLF)
: Style.LineEnding == FormatStyle::LE_CRLF);
+ std::optional<bool> inLicenseText{};
----------------
seranu wrote:
Changed
https://github.com/llvm/llvm-project/pull/77918
More information about the cfe-commits
mailing list