[clang] [clang-format] Support of TableGen formatting. (PR #76059)
Emilia Kond via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 22 07:12:19 PST 2023
================
@@ -272,6 +276,38 @@ void FormatTokenLexer::tryMergePreviousTokens() {
return;
}
}
+ if (Style.isTableGen()) {
+ if (tryMergeTokens({tok::l_square, tok::l_brace},
+ TT_TableGenMultiLineString)) {
+ Tokens.back()->Tok.setKind(tok::string_literal);
+ return;
+ }
+ if (Tokens.size() > 1 && Tokens.end()[-2]->is(tok::exclaim)) {
+ if (Tokens.back()->is(tok::identifier) ||
+ (Tokens.back()->is(tok::kw_if) && Tokens.back())) {
+ }
+ }
----------------
rymiel wrote:
This if statement does nothing, or am I misunderstanding it?
https://github.com/llvm/llvm-project/pull/76059
More information about the cfe-commits
mailing list