This is an archive of the discontinued LLVM Phabricator instance.

[libc++] [test] Remove IFNDR uses of std::invocable.
ClosedPublic

Authored by Quuxplusone on Dec 26 2021, 6:40 PM.

Details

Summary

libstdc++'s implementation diagnoses these with hard errors: std::invocable<Ts...> is IFNDR whenever std::is_invocable<Ts...> is IFNDR, which happens whenever any of the Ts... are not "complete types, cv void, or arrays of unknown bound." In particular, arrays of known bound of incomplete element types are bad — but references to such arrays are perfectly fine, so that's the fix here.

Fixes https://github.com/llvm/llvm-project/issues/50059

Diff Detail

Event Timeline

Quuxplusone requested review of this revision.Dec 26 2021, 6:40 PM
Quuxplusone created this revision.
Herald added 1 blocking reviewer(s): Restricted Project. · View Herald TranscriptDec 26 2021, 6:40 PM
ldionne requested changes to this revision.Jan 3 2022, 6:36 AM

If this is IFNDR and we are able to diagnose it, why don't we do like libstdc++ and add a test for this implementation-specific diagnostic in test/libcxx?

This revision now requires changes to proceed.Jan 3 2022, 6:36 AM

If this is IFNDR and we are able to diagnose it, why don't we do like libstdc++ and add a test for this implementation-specific diagnostic in test/libcxx?

Because https://quuxplusone.github.io/blog/2021/12/27/libstdcxx-what-are-you-doing/

ldionne accepted this revision.Jan 3 2022, 12:38 PM

If this is IFNDR and we are able to diagnose it, why don't we do like libstdc++ and add a test for this implementation-specific diagnostic in test/libcxx?

Because https://quuxplusone.github.io/blog/2021/12/27/libstdcxx-what-are-you-doing/

Makes sense.

This revision is now accepted and ready to land.Jan 3 2022, 12:38 PM
This revision was landed with ongoing or failed builds.Jan 4 2022, 11:14 AM
This revision was automatically updated to reflect the committed changes.