Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Parse/ParseDecl.cpp | ||
---|---|---|
4596 | 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. |
Might be mooted by fixing https://github.com/llvm/llvm-project/issues/57659, which I am working on
Great! Agree that larger changes around using-enum parsing would probably end up solving this in some better way.
Do you mind if I land it anyway? The testcase is useful even if the impl changes.
(Plus this is crashing for us in production, so just in case that larger change takes longer...)
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.