================ @@ -163,11 +163,16 @@ void Parser::ParseHLSLAnnotations(ParsedAttributes &Attrs, SourceLocation SlotLoc = Tok.getLocation(); ArgExprs.push_back(ParseIdentifierLoc()); - // Add numeric_constant for fix-it. - if (SlotStr.size() == 1 && Tok.is(tok::numeric_constant)) + if (SlotStr.size() == 1) { + if (!Tok.is(tok::numeric_constant)) { + Diag(Tok.getLocation(), diag::err_expected) << tok::numeric_constant; + SkipUntil(tok::r_paren, StopAtSemi); // skip through ) ---------------- spall wrote:
I'm unfamiliar with the parsing code so this might be a dumb question, but why do you SkipUntil here? What happens after the code returns? https://github.com/llvm/llvm-project/pull/135287 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits