[clang] [clang-format] Option to ignore PP directives (PR #70338)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 12 11:44:27 PST 2023


================
@@ -1355,6 +1355,8 @@ unsigned UnwrappedLineFormatter::format(
     bool FixIndentation = (FixBadIndentation || ContinueFormatting) &&
                           Indent != TheLine.First->OriginalColumn;
     bool ShouldFormat = TheLine.Affected || FixIndentation;
+    if (Style.IgnorePPDefinitions && TheLine.Type == LT_PreprocessorDirective)
----------------
HazardyKnusperkeks wrote:

Wouldn't this take all preprocessor directives from the formatting? This is at least not what the documentation states.

https://github.com/llvm/llvm-project/pull/70338


More information about the cfe-commits mailing list