[PATCH] D13357: [Concepts] Diagnose when 'concept' is specified on a specialization

Nathan Wilson via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 18 15:10:20 PST 2015


nwilson added inline comments.

================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2003
@@ +2002,3 @@
+def err_concept_specified_specialization : Error<
+  "%'concept' cannot be applied on an "
+  "%select{explicit instantiation|explicit specialization|partial specialization}0">;
----------------
aaron.ballman wrote:
> Is this an extraneous %?
Good catch. I'll remove it when making the commit.

================
Comment at: lib/Sema/SemaDecl.cpp:7659
@@ +7658,3 @@
+        Diag(D.getDeclSpec().getConceptSpecLoc(),
+             diag::err_concept_specified_specialization) << 1;
+      }
----------------
hubert.reinterpretcast wrote:
> I don't think the declaration should still be marked as a concept in this case.
Hmm, Richard - did you have any thoughts about this? IIRC, we might be okay here by only looking at the concept flag of the primary template.


http://reviews.llvm.org/D13357





More information about the cfe-commits mailing list