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

via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 18 04:52:45 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)
----------------
tomekpaszek wrote:

Yes, a good catch. Fixed is now and added a test case for it

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


More information about the cfe-commits mailing list