[clang] [clang-format] Option to ignore macro definitions (PR #70338)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 22 12:32:39 PST 2023
================
@@ -1355,6 +1362,10 @@ unsigned UnwrappedLineFormatter::format(
bool FixIndentation = (FixBadIndentation || ContinueFormatting) &&
Indent != TheLine.First->OriginalColumn;
bool ShouldFormat = TheLine.Affected || FixIndentation;
+
+ if (Style.IgnorePPDefinitions && LineContainsPPDefinition(TheLine))
----------------
owenca wrote:
```suggestion
if (Style.IgnorePPDefinitions && TheLine.startsWith(tok::hash, tok::pp_define))
```
https://github.com/llvm/llvm-project/pull/70338
More information about the cfe-commits
mailing list