[LLVMbugs] [Bug 20760] New: Assertion `!isTokenSpecial() && "Should consume special tokens with Consume*Token"' failed.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Aug 26 19:39:52 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=20760
Bug ID: 20760
Summary: Assertion `!isTokenSpecial() && "Should consume
special tokens with Consume*Token"' failed.
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: hstong at ca.ibm.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Parser assertion hit on misplaced right parenthesis in NSDMI.
### SOURCE:
$ cat mismatchParen.cc
struct A {
int x = );
};
### COMPILER INVOCATION AND OUTPUT:
$ clang -cc1 -x c++ -std=c++11 mismatchParen.cc
clang:
/build/clang/src/llvm/tools/clang/lib/Parse/../../include/clang/Parse/Parser.h:300:
clang::SourceLocation clang::Parser::ConsumeToken(): Assertion
`!isTokenSpecial() && "Should consume special tokens with Consume*Token"'
failed.
0 clang 0x0000000003c87265 llvm::sys::PrintStackTrace(_IO_FILE*) +
38
1 clang 0x0000000003c874e2
2 clang 0x0000000003c86e88
3 libpthread.so.0 0x00007f6978d44340
4 libc.so.6 0x00007f6977f80f79 gsignal + 57
5 libc.so.6 0x00007f6977f84388 abort + 328
6 libc.so.6 0x00007f6977f79e36
7 libc.so.6 0x00007f6977f79ee2
8 clang 0x00000000015f5a1c
9 clang 0x000000000167b8c7
clang::Parser::ConsumeAndStoreInitializer(llvm::SmallVector<clang::Token, 4u>&,
clang::Parser::CachedInitKind) + 1993
10 clang 0x00000000016788f1
clang::Parser::ParseCXXNonStaticMemberInitializer(clang::Decl*) + 353
11 clang 0x0000000001627706
clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier,
clang::AttributeList*, clang::Parser::ParsedTemplateInfo const&,
clang::ParsingDeclRAIIObject*) + 5454
12 clang 0x0000000001628d99
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation,
clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int,
clang::Decl*) + 3271
13 clang 0x0000000001624f24
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&) + 7694
14 clang 0x0000000001611745
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) + 9067
15 clang 0x00000000015fa5b1
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 71
16 clang 0x00000000015faa57
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 189
17 clang 0x00000000015fa221
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 2911
18 clang 0x00000000015f9678
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 538
19 clang 0x00000000015f2e1f clang::ParseAST(clang::Sema&, bool, bool)
+ 399
20 clang 0x00000000010af8c4 clang::ASTFrontendAction::ExecuteAction()
+ 322
21 clang 0x00000000010af39f clang::FrontendAction::Execute() + 139
22 clang 0x00000000010799bd
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 721
23 clang 0x000000000103d1eb
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 993
24 clang 0x000000000102ad32 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 770
25 clang 0x0000000001037cbc
26 clang 0x00000000010380f0 main + 661
27 libc.so.6 0x00007f6977f6bec5 __libc_start_main + 245
28 clang 0x0000000001029369
Stack dump:
0. Program arguments: clang -cc1 -x c++ -std=c++11 mismatchParen.cc
1. mismatchParen.cc:2:12: current parser token ')'
2. mismatchParen.cc:1:1: parsing struct/union/class body 'A'
Aborted (core dumped)
### COMPILER VERSION INFO:
$ clang -v
clang version 3.6.0 (trunk 215824)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Candidate multilib: .;@m64
Selected multilib: .;@m64
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140827/64237f77/attachment.html>
More information about the llvm-bugs
mailing list