<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - clang crashes if one class defines another classes member using a friend *definition*"
href="http://llvm.org/bugs/show_bug.cgi?id=16423">16423</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang crashes if one class defines another classes member using a friend *definition*
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>david.majnemer@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>namespace dr136 { // dr136: no
class C {};
struct A {
friend void C::f(int, int, int) {}
};
}
llvm/src/include/llvm/Support/Casting.h:97: static bool llvm::isa_impl_cl<To,
const From*>::doit(const From*) [with To = clang::FunctionDecl, From =
clang::Decl]: Assertion `Val && "isa<> used on a null pointer"' failed.
0 clang++ 0x0000000001df2f9d llvm::sys::PrintStackTrace(_IO_FILE*) +
38
1 clang++ 0x0000000001df3224
2 clang++ 0x0000000001df2c68
3 libpthread.so.0 0x00007f0e7e34fcb0
4 libc.so.6 0x00007f0e7d7a5425 gsignal + 53
5 libc.so.6 0x00007f0e7d7a8b8b abort + 379
6 libc.so.6 0x00007f0e7d79e0ee
7 libc.so.6 0x00007f0e7d79e192
8 clang++ 0x0000000001e4651f
9 clang++ 0x0000000001e4473c
10 clang++ 0x0000000001e94163
11 clang++ 0x0000000001e8ed55 bool llvm::isa<clang::FunctionDecl,
clang::Decl*>(clang::Decl* const&) + 24
12 clang++ 0x0000000001f0bddf
llvm::enable_if<llvm::is_same<clang::Decl,
llvm::simplify_type<clang::Decl>::SimpleType>,
llvm::cast_retty<clang::FunctionDecl, clang::Decl*>::ret_type>::type
llvm::dyn_cast<clang::FunctionDecl, clang::Decl>(clang::Decl*) + 24
13 clang++ 0x000000000224e030
14 clang++ 0x000000000224eacb
clang::Parser::ParseCXXInlineMethodDef(clang::AccessSpecifier,
clang::AttributeList*, clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::VirtSpecifiers const&,
clang::FunctionDefinitionKind, clang::ActionResult<clang::Expr*, true>&) + 2675
15 clang++ 0x0000000002205da2
clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier,
clang::AttributeList*, clang::Parser::ParsedTemplateInfo const&,
clang::ParsingDeclRAIIObject*) + 3858
16 clang++ 0x0000000002207ab9
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation,
clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int,
clang::Decl*) + 2901
17 clang++ 0x0000000002204071
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&) + 8171
18 clang++ 0x00000000021efaed
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) + 8343
19 clang++ 0x00000000021d9a57
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 101
20 clang++ 0x00000000021d9ef1
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 189
21 clang++ 0x00000000021d96a5
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 2783
22 clang++ 0x00000000021febef
clang::Parser::ParseInnerNamespace(std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, std::vector<clang::IdentifierInfo*,
std::allocator<clang::IdentifierInfo*> >&, std::vector<clang::SourceLocation,
std::allocator<clang::SourceLocation> >&, unsigned int, clang::SourceLocation&,
clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) + 193
23 clang++ 0x00000000021fea5d clang::Parser::ParseNamespace(unsigned
int, clang::SourceLocation&, clang::SourceLocation) + 3253
24 clang++ 0x00000000021ea7fb
clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned
int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 545
25 clang++ 0x00000000021d9256
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 1680
26 clang++ 0x00000000021d8b95
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 415
27 clang++ 0x00000000021d529b clang::ParseAST(clang::Sema&, bool, bool)
+ 387
28 clang++ 0x00000000020d7802 clang::ASTFrontendAction::ExecuteAction()
+ 298
29 clang++ 0x00000000020d7358 clang::FrontendAction::Execute() + 200
30 clang++ 0x00000000020b00dc
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 720
31 clang++ 0x0000000001df7ef8
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1018
32 clang++ 0x0000000000d51ba4 cc1_main(char const**, char const**, char
const*, void*) + 717
33 clang++ 0x0000000000d4b667 main + 496
34 libc.so.6 0x00007f0e7d79076d __libc_start_main + 237
35 clang++ 0x0000000000d49df9</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>