[clang] [clang-format] Support of TableGen statements in unwrapped line parser (PR #78846)
Björn Schäpers via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 20 12:05:48 PST 2024
================
@@ -2743,6 +2760,14 @@ FormatToken *UnwrappedLineParser::parseIfThenElse(IfStmtKind *IfKind,
}
}
+ // TableGen's if statement has the form of `if <cond> then { ... }`.
+ if (Style.isTableGen()) {
+ while (!eof() && !(FormatTok->is(Keywords.kw_then))) {
----------------
HazardyKnusperkeks wrote:
```suggestion
while (!eof() && FormatTok->isNot(Keywords.kw_then)) {
```
https://github.com/llvm/llvm-project/pull/78846
More information about the cfe-commits
mailing list