ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.

LGTM to fix the crash.
If @urnathan's changes happen to make this change obsolete, we could also 
revert consider reverting it afterwards.



================
Comment at: clang/lib/Parse/ParseDecl.cpp:4591
     Actions.CodeCompleteTag(getCurScope(), DeclSpec::TST_enum);
+    DS.SetTypeSpecError();
     return;
----------------
sammccall wrote:
> this is a bit unusual, usually parse() functions just stop after hitting CC, 
> as if they hit something unexpected.
> 
> However ParseUsingDeclaration immediately calls ActOnUsingDeclaration, which 
> asserts that the enum specifier we parsed was one of {enum, typename, error}. 
> It seems simpler to signal failure using the existing mechanism than add a 
> new one - LMK what you think.
Could you add a comment mentioning that `ActOnUsingDeclaration` will break if 
we don't do this?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134243/new/

https://reviews.llvm.org/D134243

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to