[clang] [clang-format] Add IndentPPDirectives Leave option (PR #139750)
Björn Schäpers via cfe-commits
cfe-commits at lists.llvm.org
Mon May 19 00:59:16 PDT 2025
================
@@ -1142,7 +1144,8 @@ void UnwrappedLineParser::parsePPEndIf() {
// If the #endif of a potential include guard is the last thing in the file,
// then we found an include guard.
if (IncludeGuard == IG_Defined && PPBranchLevel == -1 && Tokens->isEOF() &&
- Style.IndentPPDirectives != FormatStyle::PPDIS_None) {
+ !(Style.IndentPPDirectives == FormatStyle::PPDIS_None ||
+ Style.IndentPPDirectives == FormatStyle::PPDIS_Leave)) {
----------------
HazardyKnusperkeks wrote:
```suggestion
Style.IndentPPDirectives != FormatStyle::PPDIS_None &&
Style.IndentPPDirectives != FormatStyle::PPDIS_Leave) {
```
https://github.com/llvm/llvm-project/pull/139750
More information about the cfe-commits
mailing list