sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.

Fantastic, thank you!



================
Comment at: clang-tools-extra/clangd/unittests/DiagnosticsTests.cpp:794
 
+TEST(DiagnosticsTest, ConstrainedImplicitDeductionGuides) {
+  Annotations Header(R"cpp(
----------------
Having solved and tested this in the AST, this test is arguably redundant (it's 
not like there's anything interesting going on in de/serialization).

Happy if you want to keep it as a regression test, maybe leave a comment that 
we used to crash here or linking to the bug?


================
Comment at: clang/test/SemaTemplate/deduction-guide.cpp:219
+
+template <typename T> F(T) -> F<>;
+
----------------
Before your patch, clang requires this explicit deduction guide in order to 
accept the code.
Without it, it says the two implicit deduction guides from the constructor are 
ambiguous. But this is precisely because they lack the constraints!

After your patch, clang accepts this code without the explicit deduction guide.
So I think omitting the guide (and having no `expected-error...`) makes it a 
better test - in addition to verifying the guides can be dumped, it checks they 
are used.

(Kadir and I spent some time poking at variations of this example to understand 
how CTAD works in the AST, so thanks for this!)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113874

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

Reply via email to