This is an archive of the discontinued LLVM Phabricator instance.

[concepts] Implement dcl.decl.general p4: No constraints on non-template funcs
ClosedPublic

Authored by erichkeane on May 16 2022, 10:44 AM.

Details

Summary

The standard says:

The optional requires-clause ([temp.pre]) in an init-declarator or
member-declarator shall be present only if the declarator declares a
templated function ([dcl.fct]).

This implements that limitation, and updates the tests to the best of my
ability to capture the intent of the original checks.

Diff Detail

Event Timeline

erichkeane created this revision.May 16 2022, 10:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 16 2022, 10:44 AM
erichkeane requested review of this revision.May 16 2022, 10:44 AM
royjacobson accepted this revision.May 16 2022, 1:23 PM
royjacobson added a subscriber: royjacobson.

Code and added/modified tests LGTM!

Do you think we should add a release note, given that it could break existing code? Its seems a bit unlikely, but the amount of broken tests have made me a bit worried.
Also, maybe mention the github issue (https://github.com/llvm/llvm-project/issues/51173) in the commit message.

clang/test/Parser/cxx-concepts-requires-clause.cpp
145
This revision is now accepted and ready to land.May 16 2022, 1:23 PM
erichkeane marked an inline comment as done.May 17 2022, 5:51 AM

Code and added/modified tests LGTM!

Do you think we should add a release note, given that it could break existing code? Its seems a bit unlikely, but the amount of broken tests have made me a bit worried.
Also, maybe mention the github issue (https://github.com/llvm/llvm-project/issues/51173) in the commit message.

Thanks for the review! I absolutely need a release note, I'll add one before committing.

This revision was landed with ongoing or failed builds.May 17 2022, 6:22 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMay 17 2022, 6:22 AM