[PATCH] D119544: Deferred Concept Instantiation Implementation

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 26 12:09:59 PDT 2022


erichkeane added a comment.

OK, 1 issue left (see `FriendFunc`).



================
Comment at: clang/test/SemaTemplate/concepts.cpp:436
+  SingleDepthReferencesTopLambda(v);
+  // TODO: This should error on constraint failure! (Lambda!)
+  SingleDepthReferencesTopLambda(will_fail);
----------------
So see the 'TODO' for all the interesting cases.  Lambdas apparently have not had their constraints checked even before this: https://godbolt.org/z/sxjTx7WGn

So I think that is a bug that is 'existing', and I would love to make that a separate patch/bug fix.


================
Comment at: clang/test/SemaTemplate/concepts.cpp:471
+  // isn't re-evaluating the constraint?
+  FriendFunc(CFC, 1.0);
+
----------------
THIS one looks like a regression, it seems to matter which order these two functions are called in, whether it catches it or not.

So this is the 1 example I have: https://godbolt.org/z/vY4f3961s  Note that if you swap lines 32 and 33, this patch ALSO fails, but in the version in the example, it does NOT fail despite the fact that it SHOULD.


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

https://reviews.llvm.org/D119544



More information about the cfe-commits mailing list