diff --git a/llvm/lib/TableGen/TGParser.cpp b/llvm/lib/TableGen/TGParser.cpp --- a/llvm/lib/TableGen/TGParser.cpp +++ b/llvm/lib/TableGen/TGParser.cpp @@ -2539,9 +2539,9 @@ if (consume(tgtok::greater)) // end of argument list? return false; - if (!consume(tgtok::comma)) // must be comma - return true; - ++ArgIndex; + if (!consume(tgtok::comma)) + return TokError("Expected comma before next argument"); + ++ArgIndex; } }