[PATCH] D40381: Parse concept definition

Saar Raz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 17 14:01:20 PST 2017

saar.raz added inline comments.

Comment at: lib/Sema/SemaTemplate.cpp:3899
+  // constraint expressions right now.
+  return Template->getConstraintExpr();
faisalv wrote:
> I don't think we want to just return the constraint expr? I think we would need to create another conceptspecializationDecl node and nest it within a DeclRefExpr?  But once again, I think we should defer this to another patch - no?
This was meant as a placeholder. The next patch (D41217) replaces this function, I don't think it is that much of a big deal what happens here in this patch.

Comment at: lib/Sema/SemaTemplate.cpp:7713
+  if (!ConstraintExpr->isTypeDependent() &&
+      ConstraintExpr->getType() != Context.BoolTy) {
faisalv wrote:
> Consider refactoring these checks on constraint expressions into a separate function checkConstraintExpression (that we can also call from other contexts such as requires-clauses and nested requires expressions)?
I did that in the upcoming patches, no need to do it here as well.


More information about the cfe-commits mailing list