[clang] [clang-format] Add IndentPPDirectives Leave option (PR #139750)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 12 00:57:16 PDT 2025
================
@@ -1656,7 +1662,8 @@ void UnwrappedLineFormatter::formatFirstToken(
// Preprocessor directives get indented before the hash only if specified. In
// Javascript import statements are indented like normal statements.
if (!Style.isJavaScript() &&
- Style.IndentPPDirectives != FormatStyle::PPDIS_BeforeHash &&
+ (Style.IndentPPDirectives == FormatStyle::PPDIS_None ||
+ Style.IndentPPDirectives == FormatStyle::PPDIS_AfterHash) &&
----------------
owenca wrote:
Ditto.
https://github.com/llvm/llvm-project/pull/139750
More information about the cfe-commits
mailing list