[llvm-bugs] [Bug 48780] New: Assertion fail with nested requires requires and varadic template

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Jan 17 11:41:14 PST 2021


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

            Bug ID: 48780
           Summary: Assertion fail with nested requires requires and
                    varadic template
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++2a
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ryan_greenblatt at brown.edu
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

```
template <typename T> struct StructWithMember;

template <typename T>
concept NestedRequiresRequires = requires {
  requires requires { StructWithMember<T>::value; };
};

template <NestedRequiresRequires... T> struct Variadic {};
constexpr Variadic<int> a;
```
This trips an assertion:
Assertion `!isExprSubstitutionFailure() && "ExprRequirement has no expression
because there has been a " "substitution failure."' failed.

This minimal reproduction doesn't crash when compiled by a -NDEBUG build of
clang, but I have seen crashes in -NDEBUG builds related to this issue in more
complex code. So the probablem isn't just an incorrect assertion.

-- 
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/20210117/8491af14/attachment.html>


More information about the llvm-bugs mailing list