aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorGedare Bloom <gedare@rtems.org>2025-09-14 14:47:06 -0600
committerGitHub <noreply@github.com>2025-09-14 13:47:06 -0700
commit7dd2f1cc10902e632c0c78c75a30432a53eb59dc (patch)
treef0fd3b24672aac4bce31b131b445e41e50d5cd0f /clang/lib/Format/Format.cpp
parent43384913b636854b92c7de9e326f879a1993f445 (diff)
downloadllvm-7dd2f1cc10902e632c0c78c75a30432a53eb59dc.zip
llvm-7dd2f1cc10902e632c0c78c75a30432a53eb59dc.tar.gz
llvm-7dd2f1cc10902e632c0c78c75a30432a53eb59dc.tar.bz2
[clang-format] Add IndentPPDirectives Leave option (#139750)
Allow an option to leave preprocessor directive indenting as-is. This simplifies handling mixed styles of CPP directive indentation. Fixes #38511
Diffstat (limited to 'clang/lib/Format/Format.cpp')
-rw-r--r--clang/lib/Format/Format.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index f095d2c..1776e37 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -535,6 +535,7 @@ struct ScalarEnumerationTraits<FormatStyle::PPDirectiveIndentStyle> {
IO.enumCase(Value, "None", FormatStyle::PPDIS_None);
IO.enumCase(Value, "AfterHash", FormatStyle::PPDIS_AfterHash);
IO.enumCase(Value, "BeforeHash", FormatStyle::PPDIS_BeforeHash);
+ IO.enumCase(Value, "Leave", FormatStyle::PPDIS_Leave);
}
};