[LLVMbugs] [Bug 15741] New: ICE on invalid 'class { template { typename {'

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Apr 13 06:19:44 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=15741

            Bug ID: 15741
           Summary: ICE on invalid 'class { template { typename {'
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dimhen at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

$ cat x.ii
              class    {                     template<typename          {   $

No EOL at EOF

$ clang++ -fsyntax-only x.ii
x.ii:1:76: error: expected a qualified name after 'typename'
              class    {                     template<typename             {    
                                                                           ^
x.ii:1:76: error: expected ',' or '>' in template-parameter-list
x.ii:1:83: error: expected member name or ';' after declaration specifiers
clang: /home/dimhen/src/llvm/tools/clang/lib/Frontend/TextDiagnostic.cpp:969:
void highlightRange(const clang::CharSourceRange&, unsigned int, clang::FileID,
const {anonymous}::SourceColumnMap&, std::string&, const clang::SourceManager&,
const clang::LangOptions&): Assertion `StartColNo <= EndColNo && "Trying to
highlight whitespace??"' failed.
0  clang           0x0000000001dba142 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  clang           0x0000000001db9d99
2  libpthread.so.0 0x0000003eb020f000
3  libc.so.6       0x0000003eafa35ba5 gsignal + 53
4  libc.so.6       0x0000003eafa37358 abort + 328
5  libc.so.6       0x0000003eafa2e972
6  libc.so.6       0x0000003eafa2ea22
7  clang           0x00000000006bcd41
clang::TextDiagnostic::emitSnippetAndCaret(clang::SourceLocation,
clang::DiagnosticsEngine::Level,
llvm::SmallVectorImpl<clang::CharSourceRange>&,
llvm::ArrayRef<clang::FixItHint>, clang::SourceManager const&) + 9137
8  clang           0x00000000006aeea1
clang::DiagnosticRenderer::emitCaret(clang::SourceLocation,
clang::DiagnosticsEngine::Level, llvm::ArrayRef<clang::CharSourceRange>,
llvm::ArrayRef<clang::FixItHint>, clang::SourceManager const&) + 145
9  clang           0x00000000006b008d
clang::DiagnosticRenderer::emitDiagnostic(clang::SourceLocation,
clang::DiagnosticsEngine::Level, llvm::StringRef,
llvm::ArrayRef<clang::CharSourceRange>, llvm::ArrayRef<clang::FixItHint>,
clang::SourceManager const*, llvm::PointerUnion<clang::Diagnostic const*,
clang::StoredDiagnostic const*>) + 765
10 clang           0x000000000067d2a2
clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level,
clang::Diagnostic const&) + 898
11 clang           0x00000000012c2534
clang::DiagnosticIDs::EmitDiag(clang::DiagnosticsEngine&,
clang::DiagnosticIDs::Level) const + 52
12 clang           0x00000000012c27b5
clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const + 341
13 clang           0x00000000012bb524
clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool) + 36
14 clang           0x0000000000629700
15 clang           0x00000000009738b8
clang::Parser::ParseDirectDeclarator(clang::Declarator&) + 2344
16 clang           0x000000000096ddc7
clang::Parser::ParseDeclaratorInternal(clang::Declarator&, void
(clang::Parser::*)(clang::Declarator&)) + 199
17 clang           0x000000000096e462
clang::Parser::ParseDeclarator(clang::Declarator&) + 18
18 clang           0x000000000097d68f
clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier,
clang::AttributeList*, clang::Parser::ParsedTemplateInfo const&,
clang::ParsingDeclRAIIObject*) + 687
19 clang           0x00000000009c2796
clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,
clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject&,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 4150
20 clang           0x00000000009c2f8a
clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 698
21 clang           0x00000000009c345e
clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,
clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 158
22 clang           0x000000000097dc30
clang::Parser::ParseCXXClassMemberDeclaration(clang::AccessSpecifier,
clang::AttributeList*, clang::Parser::ParsedTemplateInfo const&,
clang::ParsingDeclRAIIObject*) + 2128
23 clang           0x000000000097fa84
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation,
clang::SourceLocation, clang::Parser::ParsedAttributesWithRange&, unsigned int,
clang::Decl*) + 1476
24 clang           0x0000000000981c7b
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind,
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext,
clang::Parser::ParsedAttributesWithRange&) + 3883
25 clang           0x0000000000969085
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&,
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier,
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) + 3285
26 clang           0x0000000000958250
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 96
27 clang           0x00000000009585d2
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 114
28 clang           0x000000000095a8db
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 107
29 clang           0x000000000095af33
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 195
30 clang           0x00000000009564f5 clang::ParseAST(clang::Sema&, bool, bool)
+ 389
31 clang           0x0000000000653909 clang::FrontendAction::Execute() + 265
32 clang           0x0000000000633d05
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 341
33 clang           0x000000000061b012
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1794
34 clang           0x00000000006129d8 cc1_main(char const**, char const**, char
const*, void*) + 888
35 clang           0x000000000061a290 main + 4992
36 libc.so.6       0x0000003eafa21a05 __libc_start_main + 245
37 clang           0x0000000000611999
Stack dump:
0.    Program arguments: /home/dimhen/build/csa/Release+Asserts/bin/clang -cc1
-triple x86_64-unknown-linux-gnu -fsyntax-only -disable-free -main-file-name
x.ii -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-target-linker-version 2.23.51.0.1 -resource-dir
/home/dimhen/build/csa/Release+Asserts/bin/../lib/clang/3.3 -fdeprecated-macro
-fdebug-compilation-dir /home/dimhen/errs/clang -ferror-limit 19
-fmessage-length 90 -mstackrealign -fobjc-runtime=gcc
-fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops
-x c++-cpp-output x.ii 
1.    <eof> parser at end of file
2.    x.ii:1:15: parsing struct/union/class body
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.3 (trunk 179458)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg: Error generating preprocessed source(s) - no
preprocessable inputs.

-- 
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/20130413/a2b60b5c/attachment.html>


More information about the llvm-bugs mailing list