[clang] [clang-format] Add IndentPPDirectives Leave option (PR #139750)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 12 00:57:17 PDT 2025
================
@@ -162,15 +162,17 @@ UnwrappedLineParser::UnwrappedLineParser(
LangOpts(getFormattingLangOpts(Style)), Keywords(Keywords),
CommentPragmasRegex(Style.CommentPragmas), Tokens(nullptr),
Callback(Callback), AllTokens(Tokens), PPBranchLevel(-1),
- IncludeGuard(Style.IndentPPDirectives == FormatStyle::PPDIS_None
+ IncludeGuard((Style.IndentPPDirectives == FormatStyle::PPDIS_None ||
+ Style.IndentPPDirectives == FormatStyle::PPDIS_Leave)
----------------
owenca wrote:
```suggestion
IncludeGuard(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