[clang] [clang-format] Support of TableGen value annotations. (PR #80299)
Hirofumi Nakamura via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 1 07:22:14 PST 2024
================
@@ -1423,11 +1692,30 @@ class AnnotatingParser {
if (!Tok->getPreviousNonComment())
Line.IsContinuation = true;
}
+ if (Style.isTableGen()) {
+ if (Tok->is(Keywords.kw_assert)) {
+ if (!parseTableGenValue())
+ return false;
+ } else if (Tok->isOneOf(Keywords.kw_def, Keywords.kw_defm) &&
+ (!Tok->Next ||
+ !Tok->Next->isOneOf(tok::colon, tok::l_brace))) {
+ // The case NameValue appears.
+ if (!parseTableGenValue(true))
+ return false;
+ }
+ }
----------------
hnakamura5 wrote:
In consumeToken().
https://github.com/llvm/llvm-project/pull/80299
More information about the cfe-commits
mailing list