================
@@ -8,3 +8,28 @@ template <int Unroll> void foo() {
#pragma GCC unroll Unroll
for (int i = 0; i < Unroll; ++i);
}
+
+struct val {
+ constexpr operator int() const { return 1; }
+};
+
+// generic lambda (using double template instantiation)
+
+template<typename T>
+void use(T t) {
+ auto lam = [](auto N) {
----------------
brunodf-snps wrote:
Since your comment, I have tried quite a bit to trigger the crash without using
a generic lambda: using partial/full specializations, template members inside
template classes, template template parameters..., all without success. Perhaps
I lack the imagination to come up with sufficiently complex template
instantiation scenarios, but since you mention that the instantiation of
lambdas is a current design flaw, I'm starting to suspect that the problem can
only arise in the context of this flawed design.
If that is the case, then I think we would still need the modification as a
workaround, but we should document in the code that the extra check should no
longer be needed if the instantiation of lambdas is ever redesigned?
https://github.com/llvm/llvm-project/pull/172289
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits