[llvm-bugs] [Bug 41056] New: Crash on valid - templates, sfinae, and is_constructible

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 13 12:00:25 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=41056

            Bug ID: 41056
           Summary: Crash on valid - templates, sfinae, and
                    is_constructible
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dblaikie at gmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

template <bool>
struct c;
struct f {
  template <typename d>
  f(d);
};
struct i {
  template <typename g, typename = typename c<__is_constructible(f, g)>::b>
  i(g);
};
struct e {
  i h = e();
};

Maybe infinite recursion in some template instantiation code - in the crash
stack I see 7 instances of clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDependentNameType(TypeLocBuilder,
DependentNameTypeLoc, bool)

But maybe that's expected-ish for this code? I'm not sure.

(found tangentially while reducing that libstdc++ modules rejects-valid)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190313/f135ffea/attachment.html>


More information about the llvm-bugs mailing list