[PATCH] D120255: [Concepts] Check constraints for explicit template instantiations
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 2 06:11:56 PST 2022
aaron.ballman 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
----------------
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.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120255/new/
https://reviews.llvm.org/D120255
More information about the cfe-commits
mailing list