[llvm-bugs] [Bug 24587] New: Assertion failed: !T->isDependentType()

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 26 10:06:05 PDT 2015


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

            Bug ID: 24587
           Summary: Assertion failed: !T->isDependentType()
           Product: clang
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++14
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ldionne.2 at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

The following code triggers an assertion on Clang trunk:

------------------------------------------------------------------------------
template <typename T, T v>
struct integral_constant { };

auto false_ = integral_constant<bool, false>{};

template <typename T>
void f(T, decltype(false_));

int main() {
    f(1, integral_constant<bool, true>{});
}
------------------------------------------------------------------------------


The command line and output is

------------------------------------------------------------------------------
> clang++-3.6 -std=c++14 -fsyntax-only test/worksheet.cpp

test/worksheet.cpp:1458:5: error: no matching function for call to 'f'
    f(1, integral_constant<bool, true>{});
    ^
Assertion failed: (!T->isDependentType() && 
    "should not see dependent types here"), 
    function getTypeInfoImpl, 
    file [snip]/llvm-3.6.2.src/tools/clang/include/clang/AST/TypeNodes.def, 
    line 98.

[stack trace normally follows]

------------------------------------------------------------------------------

Live example: http://melpon.org/wandbox/permlink/jzuGDAAI2pwXqisP

-- 
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/20150826/c77ec72e/attachment.html>


More information about the llvm-bugs mailing list