[PATCH] D41569: [Concepts] Constraint enforcement and diagnostics

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 17 12:26:18 PDT 2019


rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/Sema/SemaOverload.cpp:594
   };
+  struct CNSInfo {
+    TemplateArgumentList *TemplateArgs;
----------------
Please add a documentation comment.


================
Comment at: clang/lib/Sema/SemaOverload.cpp:10707
 
-  case Sema::TDK_InstantiationDepth:
+  case Sema::TDK_ConstraintsNotSatisfied:
     return 4;
----------------
I think we should probably rank this higher -- maybe at the same level as a deduction or substitution failure, or maybe just above that. But I'm happy to wait and iterate on that once we have library code to experiment with.


================
Comment at: clang/lib/Sema/SemaTemplate.cpp:4235
                                 /*PartialTemplateArgs=*/false, Converted,
                                 /*UpdateArgsWithConversion=*/false))
     return ExprError();
----------------
(Not directly related to this patch, feel free to address separately:) Passing false for UpdateArgsWithConversion here seems surprising: shouldn't we be using the converted arguments in the satisfaction check and storing the converted arguments on the AST?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D41569





More information about the cfe-commits mailing list