[PATCH] D127487: [Sema] Fix assertion failure when instantiating requires expression
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 22 04:56:47 PDT 2022
ilya-biryukov marked an inline comment as done.
ilya-biryukov added a comment.
@erichkeane could you take another look at this?
================
Comment at: clang/test/SemaTemplate/concepts-PR54629.cpp:10
+int main() {
+ A<int> a;
+}
----------------
ilya-biryukov wrote:
> erichkeane wrote:
> > Simply 'doesn't crash' isn't quite enough for a test here, I would like to see some level of confirmation which of the versions of "A" get selected here. So perhaps `A<double>{}.some_func();` call that wouldn't be valid/etc. And perhaps a situation where both instances have a constraint and and we diagnose why it doesn't fit?
> >
> >
> >
> I have added the test for primary template vs specialization.
> Keeping a comment open to add a test for two specializations too, I will do this a bit later.
Added a check for error messages in case of ambiguous specializations and no matching specialization (in terms of function overloads).
For classes there is no way to cause no matching specialization AFAICT.
Either a primary template will be picked and no error message will be shown or its requirements will fail and the error message will not mention the specializations at all.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127487/new/
https://reviews.llvm.org/D127487
More information about the cfe-commits
mailing list