This is an archive of the discontinued LLVM Phabricator instance.

[C++20][Concepts] Fix a failed assertion on an invalid typename requirement
ClosedPublic

Authored by aaron.ballman on Jan 18 2022, 6:30 AM.

Details

Summary

The parsing code for a typename requirement currently asserts when given something which is not a valid type-requirement (http://eel.is/c++draft/expr.prim.req.type#nt:type-requirement). This removes the assertion to continue on to the proper diagnostic.

This resolves PR53057.

Note that in that PR, it is using _BitInt(N) as a dependent type name. This patch does not attempt to support that as it is not clear that is a valid type requirement (it does not match the grammar production for one). The workaround in the PR, however, is definitely valid and works as expected.

Diff Detail

Event Timeline

aaron.ballman requested review of this revision.Jan 18 2022, 6:30 AM
aaron.ballman created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJan 18 2022, 6:30 AM
erichkeane accepted this revision.Jan 18 2022, 7:00 AM
This revision is now accepted and ready to land.Jan 18 2022, 7:00 AM