[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:25:37 PST 2024
================
@@ -915,10 +1163,12 @@ class AnnotatingParser {
Previous->setType(TT_SelectorName);
}
}
- if (CurrentToken->is(tok::colon) && OpeningBrace.is(TT_Unknown))
+ if (CurrentToken->is(tok::colon) && OpeningBrace.is(TT_Unknown) &&
+ !Style.isTableGen()) {
OpeningBrace.setType(TT_DictLiteral);
- else if (Style.isJavaScript())
+ } else if (Style.isJavaScript()) {
OpeningBrace.overwriteFixedType(TT_DictLiteral);
+ }
----------------
hnakamura5 wrote:
Line 1126 to here is inside parseBrace(), where is determining whether the l_brace is opening of dictionary literal.
TableGen does not have DictLitereals.
https://github.com/llvm/llvm-project/pull/80299
More information about the cfe-commits
mailing list