[PATCH] D152998: [TableGen] Support named arguments
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 10 14:23:21 PDT 2023
MaskRay added inline comments.
================
Comment at: llvm/include/llvm/TableGen/Record.h:322
+ IK_PositionalArgumentInit,
+ IK_NamedArgumentInit
};
----------------
Add a trailing comma so that next time we add a new member, we can avoid touching this IK_NamedArgumentInit line
================
Comment at: llvm/test/TableGen/named-arguments.td:14
+}
+// CHECK: def testClass1 {
+// CHECK-NEXT: int value = 6;
----------------
Add spaces so that `def` align with `}`. This just looks nicer.
================
Comment at: llvm/test/TableGen/named-arguments.td:99
+
+#ifdef ERROR1
+// ERROR1: Argument "d" doesn't exist
----------------
I wonder whether tablegen parsing doesn't have error recovery so that we need an invocation for every test...
In clang we test many errors in one invocation...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152998/new/
https://reviews.llvm.org/D152998
More information about the llvm-commits
mailing list