http://llvm.org/bugs/show_bug.cgi?id=9273
Summary: dependent operator name in template function argument
type crashes clang
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++0x
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
This causes clang to segfault:
template<typename T> void operator_(decltype(operator T)) {}
template void operator_<int>(int);
The crash is here:
#0 0x00000000009d29fc in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformNestedNameSpecifier(clang::NestedNameSpecifier*,
clang::SourceRange, clang::QualType, clang::NamedDecl*) ()
#1 0x00000000009d5181 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDependentScopeDeclRefExpr(clang::DependentScopeDeclRefExpr*)
()
#2 0x00000000009cbd05 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*) ()
#3 0x00000000009cdc97 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDecltypeType(clang::TypeLocBuilder&,
clang::DecltypeTypeLoc) ()
#4 0x00000000009c38bd in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&,
clang::TypeLoc) ()
#5 0x00000000009c46c0 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType(clang::TypeSourceInfo*) ()
#6 0x00000000009c4dc2 in clang::Sema::SubstType(clang::TypeSourceInfo*,
clang::MultiLevelTemplateArgumentList const&, clang::SourceLocation,
clang::DeclarationName) ()
#7 0x00000000009c9833 in clang::Sema::SubstParmVarDecl(clang::ParmVarDecl*,
clang::MultiLevelTemplateArgumentList const&, llvm::Optional<unsigned int>) ()
#8 0x00000000009ca45e in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformFunctionTypeParams(clang::SourceLocation,
clang::ParmVarDecl**, unsigned int, clang::QualType const*,
llvm::SmallVectorImpl<clang::QualType>&,
llvm::SmallVectorImpl<clang::ParmVarDecl*>*) ()
--
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