http://llvm.org/bugs/show_bug.cgi?id=14265
Bug #: 14265
Summary: Crash on invalid trying to delete a member function
declared with a typedef'd function type
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
struct S { typedef int F(); F f = delete; }
Gives:
<stdin>:1:35: error: '= delete' is a function definition and must occur in a
standalone declaration
struct S { typedef int F(); F f = delete; }
^
clang-3.2: include/llvm/Support/Casting.h:79: static bool
llvm::isa_impl_cl<clang::IntegerLiteral, clang::Expr *>:
:doit(const From *) [To = clang::IntegerLiteral, From = clang::Expr *]:
Assertion `Val && "isa<> used on a null pointer"' failed.
[...]
11 clang-3.2 0x00000000021ddd92
clang::Sema::AddInitializerToDecl(clang::Decl*, clang::Expr*, bool, bool) + 130
12 clang-3.2 0x0000000001c75220
clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier,
clang::AttributeList*, clang::Parser::ParsedTemplateInfo const&,
clang::ParsingDeclRAIIObject*) + 6704
That diagnostic isn't great, and we shouldn't crash here!
--
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