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

            Bug ID: 23194
           Summary: Assertion failed: (isa<LabelDecl>(D) && "declaration
                    not instantiated in this scope")
           Product: clang
           Version: trunk
          Hardware: Macintosh
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Assertion failed: (isa<LabelDecl>(D) && "declaration not instantiated in this
scope"), function findInstantiationOf, file
/Users/howardhinnant/Development/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp,
line 2802.

Here is a reduced case that comes from real-world code which causes this assert
in clang tip-of-trunk:

struct X
{
    int operator()() const {return 0;}
};

struct Y
{
    Y(int) {}
};

template <bool = true>
int
make_seed_pair() noexcept
{
    struct state_t
    {
        X x;
        Y y{x()};

    };
    return 0;
}

int
main()
{
    auto s = make_seed_pair();
}

Using this command line:

clang++ -std=c++11 test.cpp

This is a regression.  This compiler compiles this example ok:

Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to