[PATCH] D41217: [Concepts] Concept Specialization Expressions

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


saar.raz added inline comments.


================
Comment at: lib/Parse/ParseExpr.cpp:223
 ExprResult Parser::ParseConstraintExpression() {
-  // FIXME: this may erroneously consume a function-body as the braced
-  // initializer list of a compound literal
-  //
-  // FIXME: this may erroneously consume a parenthesized rvalue reference
-  // declarator as a parenthesized address-of-label expression
-  ExprResult LHS(ParseCastExpression(/*isUnaryExpression=*/false));
-  ExprResult Res(ParseRHSOfBinaryExpression(LHS, prec::LogicalOr));
-
+  ExprResult Res(ParseExpression());
+  if (Res.isUsable() && !Actions.CheckConstraintExpression(Res.get())) {
----------------
faisalv wrote:
> Are you sure this only accepts logical-or-epxressions? Unlike Hubert's initial implementation here, this seems to parse any expression (i.e including unparenthesized commas and assignments)? What am I missing?
> 
Mm.. Good point, I was under the false assumption that this was equivalent - I'll fix it back, thanks :) 


Repository:
  rC Clang

https://reviews.llvm.org/D41217





More information about the cfe-commits mailing list