<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 --- - Crash on invalid: using a comma instead of closing angle bracket for template."
href="http://llvm.org/bugs/show_bug.cgi?id=16677">16677</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Crash on invalid: using a comma instead of closing angle bracket for template.
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</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>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>rtrieu@google.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>When the closing angle bracket is mistakenly replaced with a comma in the
following code, Clang crashes. Needs -std=c++11 to reproduce.
class Class_With_Destructor {
~Class_With_Destructor() { }
};
template <class T>
class Base { };
template<class T, // Should be angle bracket instead of comma
class Derived : public Base<T> {
Class_With_Destructor member;
};
Stack trace:
0 clang 0x0000000001e0c563 llvm::sys::PrintStackTrace(_IO_FILE*) +
38
1 clang 0x0000000001e0c7ea
2 clang 0x0000000001e0c22e
3 libpthread.so.0 0x00007fb33614fcb0
4 clang 0x00000000022977e6
5 clang 0x000000000252134d
6 clang 0x0000000002525f12
clang::Sema::LookupSpecialMember(clang::CXXRecordDecl*,
clang::Sema::CXXSpecialMember, bool, bool, bool, bool, bool) + 110
7 clang 0x00000000023a510b
8 clang 0x00000000023a5586
9 clang 0x00000000023a5690
10 clang 0x00000000023a66b1
clang::Sema::ShouldDeleteSpecialMember(clang::CXXMethodDecl*,
clang::Sema::CXXSpecialMember, bool) + 1513
11 clang 0x00000000023b2f0d
clang::Sema::DeclareImplicitDestructor(clang::CXXRecordDecl*) + 639
12 clang 0x00000000023a8abf
clang::Sema::AddImplicitlyDeclaredMembersToClass(clang::CXXRecordDecl*) + 599
13 clang 0x0000000002353af3 clang::Sema::ActOnFields(clang::Scope*,
clang::SourceLocation, clang::Decl*, llvm::ArrayRef<clang::Decl*>,
clang::SourceLocation, clang::SourceLocation, clang::AttributeList*) + 5663
14 clang 0x00000000023a883d
clang::Sema::ActOnFinishCXXMemberSpecification(clang::Scope*,
clang::SourceLocation, clang::Decl*, clang::SourceLocation,
clang::SourceLocation, clang::AttributeList*) + 411</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>