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

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 27 12:40:18 PDT 2023


================
@@ -1354,7 +1354,9 @@ unsigned UnwrappedLineFormatter::format(
 
     bool FixIndentation = (FixBadIndentation || ContinueFormatting) &&
                           Indent != TheLine.First->OriginalColumn;
-    bool ShouldFormat = TheLine.Affected || FixIndentation;
+    bool ShouldFormat = (TheLine.Affected || FixIndentation);
----------------
HazardyKnusperkeks wrote:

Why adding the parenthesis? (Actually clang-format, if new enough, should remove them.)

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


More information about the cfe-commits mailing list