[LLVMbugs] [Bug 7625] New: 'ResultKind == NotFound && Decls.empty()' assertion on invalid code
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jul 12 04:37:53 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7625
Summary: 'ResultKind == NotFound && Decls.empty()' assertion on
invalid code
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: chris at bubblescope.net
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
The code:
template<typename _Tp>struct a:_Tp{struct:_Tp{aa(){p
Generates the output:
t.bashed.2245.cc:1:47: error: C++ requires a type specifier for all
declarations
template<typename _Tp>struct a:_Tp{struct:_Tp{aa(){p
^
t.bashed.2245.cc:1:53: error: expected '}'
template<typename _Tp>struct a:_Tp{struct:_Tp{aa(){p
^
t.bashed.2245.cc:1:46: note: to match this '{'
template<typename _Tp>struct a:_Tp{struct:_Tp{aa(){p
^
t.bashed.2245.cc:1:53: error: expected ';' after struct
template<typename _Tp>struct a:_Tp{struct:_Tp{aa(){p
^
;
t.bashed.2245.cc:1:47: error: functions cannot be declared in an anonymous
struct
template<typename _Tp>struct a:_Tp{struct:_Tp{aa(){p
^
t.bashed.2245.cc:1:53: error: expected '}'
template<typename _Tp>struct a:_Tp{struct:_Tp{aa(){p
^
t.bashed.2245.cc:1:35: note: to match this '{'
template<typename _Tp>struct a:_Tp{struct:_Tp{aa(){p
^
Assertion failed: (ResultKind == NotFound && Decls.empty()), function
setNotFoundInCurrentInstantiation, file Lookup.h, line 322.
0 clang 0x00000001010ce676 PrintStackTrace(void*) + 38
1 clang 0x00000001010ceb84 SignalHandler(int) + 254
2 libSystem.B.dylib 0x00007fff8398c35a _sigtramp + 26
3 libSystem.B.dylib 0x00007fff839310aa tiny_malloc_from_free_list + 1196
4 libSystem.B.dylib 0x00007fff83a079b4 __pthread_markcancel + 0
5 clang 0x000000010037faeb
clang::LookupResult::setNotFoundInCurrentInstantiation() + 95
6 clang 0x000000010037ac0e
clang::Sema::LookupQualifiedName(clang::LookupResult&, clang::DeclContext*,
bool) + 698
7 clang 0x000000010032b976
clang::Sema::DiagnoseEmptyLookup(clang::Scope*, clang::CXXScopeSpec&,
clang::LookupResult&, clang::Sema::CorrectTypoContext) + 272
8 clang 0x000000010033e6d4
clang::Sema::ActOnIdExpression(clang::Scope*, clang::CXXScopeSpec&,
clang::UnqualifiedId&, bool, bool) + 1568
9 clang 0x0000000100696d3d
clang::Parser::ParseCastExpression(bool, bool, bool&, void*) + 3355
10 clang 0x0000000100698c21
clang::Parser::ParseCastExpression(bool, bool, void*) + 97
11 clang 0x00000001006934a7
clang::Parser::ParseAssignmentExpression() + 241
12 clang 0x0000000100693a2e clang::Parser::ParseExpression() + 42
13 clang 0x00000001006b4c10
clang::Parser::ParseStatementOrDeclaration(bool) + 1662
14 clang 0x00000001006b9172
clang::Parser::ParseCompoundStatementBody(bool) + 220
15 clang 0x00000001006b979d
clang::Parser::ParseFunctionStatementBody(clang::OpaquePtr<0>) + 193
16 clang 0x0000000100678f97
clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) + 1373
17 clang 0x00000001006790f3
clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) + 1721
18 clang 0x000000010068da73
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, unsigned int,
clang::OpaquePtr<0>) + 1791
19 clang 0x000000010068efba
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool) + 5226
20 clang 0x0000000100681fb5
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext) + 6301
21 clang 0x00000001006bd84b
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&, clang::SourceLocation&,
clang::AccessSpecifier) + 343
22 clang 0x00000001006be07e
clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier) + 962
23 clang 0x00000001006be15a
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier) + 158
24 clang 0x00000001006860ec
clang::Parser::ParseDeclaration(unsigned int, clang::SourceLocation&,
clang::CXX0XAttributeList) + 368
25 clang 0x00000001006c4611
clang::Parser::ParseExternalDeclaration(clang::CXX0XAttributeList) + 2007
26 clang 0x00000001006c483f
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<1>&) + 247
27 clang 0x000000010025c5ad clang::ParseAST(clang::Preprocessor&,
clang::ASTConsumer*, clang::ASTContext&, bool, bool,
clang::CodeCompleteConsumer*) + 456
28 clang 0x000000010007844a
clang::ASTFrontendAction::ExecuteAction() + 254
29 clang 0x000000010021fa70 clang::CodeGenAction::ExecuteAction() +
826
30 clang 0x0000000100078558 clang::FrontendAction::Execute() + 256
31 clang 0x000000010005b720
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 710
32 clang 0x0000000100027f28 cc1_main(char const**, char const**,
char const*, void*) + 1762
33 clang 0x000000010002ef81 main + 335
34 clang 0x0000000100026e48 start + 52
Stack dump:
0. Program arguments: /usr/local/bin/clang -cc1 -triple
x86_64-apple-darwin10.0.0 -emit-obj -mrelax-all -disable-free -main-file-name
t.bashed.2245.cc -pic-level 1 -mdisable-fp-elim -masm-verbose -munwind-tables
-target-cpu core2 -resource-dir /usr/local/lib/clang/2.8 -ferror-limit 19
-fmessage-length 113 -stack-protector 1 -fblocks -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/M8/M86fCFVgGQ0r-V2oY5lLC++++TI/-Tmp-/cc-xOU4nf.o -x c++
t.bashed.2245.cc
1. <eof> parser at end of file
2. t.bashed.2245.cc:1:23: parsing struct/union/class body 'a'
3. t.bashed.2245.cc:1:51: parsing function body 'a::<anonymous struct>::aa'
4. t.bashed.2245.cc:1:51: in compound statement ('{}')
clang: error: clang frontend command failed due to signal 6 (use -v to see
invocation)
--
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.
More information about the llvm-bugs
mailing list