http://llvm.org/bugs/show_bug.cgi?id=12702
Bug #: 12702
Summary: Assertion failure when using local class as template
parameter
Product: clang
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
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;
}
};
S().apply(F());
}
};
int main()
{
T<int>().foo();
}
triggers the following assertion failure:
llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:2560:
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"'
failed.
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs