erichkeane added inline comments.

================
Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:2039
     TransConstraint = TransformExpr(Req->getConstraintExpr());
+    if (!TransConstraint.isInvalid()) {
+      bool CheckSucceeded =
----------------
I think I'd rather collapse this into SOMETHING like:

``` assert((TransConstraint.isInvalid() || 
(SemaRef.CheckConstraintExpr(TransConstraint.get() || Trap.hasErrorOccurred()) 
&& "...");```

I think thats right?  


================
Comment at: clang/lib/Sema/SemaTemplateInstantiate.cpp:2048
+    // Use version of CheckConstraintSatisfaction that does no substitutions.
+    if (!TransConstraint.isInvalid() &&
+        !TransConstraint.get()->isInstantiationDependent() &&
----------------
Same sorta thing here, if our check is only used for an assert, we should call 
it in the assert.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127487

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to