Let lists have an trailing comma to allow cleaner diffs e.g:
def : Features<[FeatureA,
FeatureB,
]>;
Reviewed By: hfinkel
Differential Revision: https://reviews.llvm.org/D59247
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356986
91177308-0d34-0410-b5e6-
96231b3b80d8
while (Lex.getCode() == tgtok::comma) {
Lex.Lex(); // Eat the comma
+ // ignore trailing comma for lists
+ if (Lex.getCode() == tgtok::r_square)
+ return;
+
if (ArgsRec && !EltTy) {
ArrayRef<Init *> TArgs = ArgsRec->getTemplateArgs();
if (ArgN >= TArgs.size()) {
def OneB : BBB<[[1,2,3]]>;
def TwoB : BBB<[[1,2,3],[4,5,6]]>;
+
+def ThreeB: BBB<[[1,2,3],
+ [4,5,6],
+ ]>;