This is an archive of the discontinued LLVM Phabricator instance.

Add diagnostics which fall under [dcl.spec.concept]p5
ClosedPublic

Authored by nwilson on Nov 4 2015, 3:10 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

nwilson updated this revision to Diff 39267.Nov 4 2015, 3:10 PM
nwilson retitled this revision from to Add diagnostics which fall under [dcl.spec.concept]p5.
nwilson updated this object.
nwilson added a subscriber: cfe-commits.
lib/Sema/SemaDecl.cpp
7575 ↗(On Diff #39267)

I think the U+2014 should be replaced by the ASCII-friendly U+002D.

test/CXX/concepts-ts/dcl.dcl/dcl.spec/dcl.spec.concept/p5.cpp
7 ↗(On Diff #39267)

Do we diagnose for the following?
template<typename... T>
concept bool fcpp(T ...t) { return true; }

This is ill-formed as well since either [dcl.spec.concept]p5 is violated or [temp.res]p8 (same paragraph reference in C++14 as in N4527) is.

test/CXX/concepts-ts/dcl.dcl/dcl.spec/dcl.spec.concept/p5.cpp
7 ↗(On Diff #39267)

Also test:
template<typename T>
concept bool fcpva(...) { return true; }

nwilson updated this revision to Diff 39314.Nov 4 2015, 9:06 PM
  • Cover variadic arguments in check for no params.
  • Add tests to cover variadic arguments.
nwilson updated this revision to Diff 39386.Nov 5 2015, 10:49 AM
  • replace hyphen and apostrophe with equivalent ASCII characters
This revision is now accepted and ready to land.Nov 5 2015, 12:03 PM
This revision was automatically updated to reflect the committed changes.