[PATCH] D14352: Add diagnostics which fall under [dcl.spec.concept]p5

Hubert Tong via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 4 15:33:32 PST 2015


hubert.reinterpretcast added inline comments.

================
Comment at: lib/Sema/SemaDecl.cpp:7575
@@ +7574,3 @@
+        // following restrictions:
+        // — The declaration’s parameter list shall be equivalent to an empty
+        //   parameter list.
----------------
I think the U+2014 should be replaced by the ASCII-friendly U+002D.

================
Comment at: test/CXX/concepts-ts/dcl.dcl/dcl.spec/dcl.spec.concept/p5.cpp:7
@@ +6,2 @@
+template<typename T>
+concept bool fcpi(int i = 0) { return true; } // expected-error {{function concept cannot have any parameters}}
----------------
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.


http://reviews.llvm.org/D14352





More information about the cfe-commits mailing list