erichkeane added inline comments.
================
Comment at: clang/test/SemaTemplate/constraints-instantiation.cpp:3-8
+// void PR46029::A<1>::f()
+// CHECK: define {{.*}} @_ZN7PR460291AILi1EE1fEv
+// void PR46029::A<2>::f()
+// CHECK: define {{.*}} @_ZN7PR460291AILi2EE1fEv
+// void PR46029::A<3>::f()
+// CHECK-NOT: define {{.*}} @_ZN7PR460291AILi3EE1fEv
----------------
royjacobson wrote:
> aaron.ballman wrote:
> > I think it might be better to test this via an `-ast-dump` test (which
> > lives in the `AST` test directory) rather than emitting LLVM IR to
> > determine whether something was instantiated or not.
> >
> > Btw, when you convert the test to use `-ast-dump`, be sure to make use of
> > regexes for things like line, column numbers, pointer values, etc so that
> > the test is easier to edit without breaking.
> I tried to look now into doing it in the ast-dump. It seems that we create a
> new `ClassTemplateSpecializationDecl` in SemaTemplate:9663
> (`ActOnExplicitInstantiation`) that is copied from the parent
> `ClassTemplateDecl` along with all its members and `CXXMethodDecl`s. That
> means that the member functions with the unsatisfied constraints still appear
> in the AST.
>
> Do you think I should add the constraints checks into the creation of
> `ClassTemplateSpecializationDecl` instead, so we don't create unnecessary
> `CXXMethodDecl`?
So one of the problems with that is the delayed-concepts thing I'm working on.
The idea is that we shouldn't be instantiating or checking until the last
moment, so unless I am misunderstanding what you mean, I would think not.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120255/new/
https://reviews.llvm.org/D120255
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits