[LLVMbugs] [Bug 12331] New: assertion on explicit specialization after instantiation
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Mar 22 15:30:28 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12331
Bug #: 12331
Summary: assertion on explicit specialization after
instantiation
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Keywords: crash-on-invalid
Severity: enhancement
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: richard-llvm at metafoo.co.uk
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Clang asserts on this:
template<typename T> struct S {
struct U { static const int n = 5; };
enum E { e = U::n };
int arr[e];
};
template<> struct S<int>::U { static const int n = sizeof(T); };
Saying:
error: explicit specialization of 'U' after instantiation
template<> struct S<int>::U { static const int n = sizeof(T); };
^
note: implicit instantiation first required here
enum E { e = U::n };
^
clang-3.1: lib/Sema/SemaLookup.cpp:1418: bool
clang::Sema::LookupQualifiedName(clang::LookupResult &, clang::DeclContext *,
bool): Assertion `(!isa<TagDecl>(LookupCtx) || LookupCtx->isDependentContext()
|| cast<TagDecl>(LookupCtx)->isCompleteDefinition() ||
Context.getTypeDeclType(cast<TagDecl>(LookupCtx))->getAs<TagType>()
->isBeingDefined()) && "Declaration context must already be complete!"' 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.
More information about the llvm-bugs
mailing list