[PATCH] D44352: [Concepts] Constrained template parameters

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 16 01:23:53 PDT 2019


martong requested changes to this revision.
martong added inline comments.
This revision now requires changes to proceed.
Herald added a subscriber: rnkovacs.


================
Comment at: lib/AST/ASTImporter.cpp:3708
+  if (Expr *CE = D->getConstraintExpression())
+    R->setConstraintExpression(VisitExpr(CE));
+  return R;
----------------
Please use the `import` function instead of `VisitExpr`. Calling `VisitExpr` would return immediately with an error, that's the default case of the `StmtVisitor`.
Also please check that there was no error during the import of the `CE` expression:
```
  ExpectedExpr CEOrErr = import(D->getConstraintExpression());
  if (!CEOrErr)
    return CEOrErr.takeError();
  R->setConstraintExpression(*CEOrErr);
```
And could you please adjust the changes below too?


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D44352/new/

https://reviews.llvm.org/D44352





More information about the cfe-commits mailing list