<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 --- - Assertion failure on class definition with attribute"
href="http://llvm.org/bugs/show_bug.cgi?id=17587">17587</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assertion failure on class definition with attribute
</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>Code:
class [[clang::warn_unused_result]] Status;
//Uncomment to not crash
//class Status {};
class Foo {
Status Bar();
};
Command line:
clang -std=c++11 unused-result.cc
Assertion:
clang-3.3: llvm/tools/clang/include/clang/AST/DeclCXX.h:569: const
clang::CXXRecordDecl::DefinitionData& clang::CXXRecordDecl::data() const:
Assertion `DefinitionData && "queried property of class with no definition"'
failed.
Backtrace snippet:
#4 0x0000000000435da8 in clang::CXXRecordDecl::data (this=0x45775c0)
at llvm/tools/clang/include/clang/AST/DeclCXX.h:569
#5 0x0000000000435ea2 in clang::CXXRecordDecl::bases_begin (this=0x45775c0)
at llvm/tools/clang/include/clang/AST/DeclCXX.h:685
#6 0x00000000017b96cc in clang::CXXMethodDecl::getCorrespondingMethodInClass (
this=0x45c4f70, RD=0x45775c0, MayBeBase=true)
at llvm/tools/clang/lib/AST/DeclCXX.cpp:1376
#7 0x00000000005bec9a in clang::CXXMethodDecl::getCorrespondingMethodInClass (
this=0x45c4f70, RD=0x45775c0, MayBeBase=true)
at llvm/tools/clang/include/clang/AST/DeclCXX.h:1802
#8 0x000000000149f2fd in clang::Sema::ActOnFunctionDeclarator (
this=0x45910f0, S=0x4569260, D=..., DC=0x45776e8, TInfo=0x45778b0,
Previous=..., TemplateParamLists=..., AddToScope=@0x7fffffff981f: true)
at llvm/tools/clang/lib/Sema/SemaDecl.cpp:6914
#9 0x00000000014955cc in clang::Sema::HandleDeclarator (this=0x45910f0,
S=0x4569260, D=..., TemplateParamLists=...)
at llvm/tools/clang/lib/Sema/SemaDecl.cpp:4317
#10 0x00000000013fd683 in clang::Sema::ActOnCXXMemberDeclarator (
this=0x45910f0, S=0x4569260, AS=clang::AS_private, D=...,
TemplateParameterLists=..., BW=0x0, VS=..., InitStyle=clang::ICIS_NoInit)
at llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp:2002
#11 0x00000000010bdd4a in clang::Parser::ParseCXXClassMemberDeclaration (
this=0x45ac460, AS=clang::AS_private, AccessAttrs=0x0, TemplateInfo=...,
TemplateDiags=0x0)
at llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp:2279
#12 0x00000000010bf49b in clang::Parser::ParseCXXMemberSpecification (
this=0x45ac460, RecordLoc=..., AttrFixitLoc=..., Attrs=..., TagType=18,
TagDecl=0x45776b0)
at llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp:2655
#13 0x00000000010bbab4 in clang::Parser::ParseClassSpecifier (this=0x45ac460,
TagTokKind=clang::tok::kw_class, StartLoc=..., DS=..., TemplateInfo=...,
AS=clang::AS_none, EnteringContext=true, DSC=clang::Parser::DSC_top_level,
Attributes=...)
at llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp:1606</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>