[LLVMbugs] [Bug 12702] New: Assertion failure when using local class as template parameter

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Apr 29 22:36:44 PDT 2012


             Bug #: 12702
           Summary: Assertion failure when using local class as template
           Product: clang
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: zeratul976 at hotmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The following code:

struct S
    template <typename F>
    bool apply(F f)
        return f();

template <typename>
struct T
    void foo()
        struct F
            int x;

            bool operator()()
                return x == 0;


int main()                  

triggers the following assertion failure:

llvm::PointerUnion<clang::Decl*, llvm::SmallVector<clang::Decl*, 4u>*>*
clang::LocalInstantiationScope::findInstantiationOf(const clang::Decl*):
Assertion `isa<LabelDecl>(D) && "declaration not instantiated in this scope"'

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list