[llvm-bugs] [Bug 38286] New: ICE "couldn't find injected class name"

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jul 24 04:16:20 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=38286

            Bug ID: 38286
           Summary: ICE "couldn't find injected class name"
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: arthur.j.odwyer at gmail.com
                CC: llvm-bugs at lists.llvm.org

This is a regression; Compiler Explorer says it reproduces in trunk but not in
6.0.0.


cat >test.cc <<EOF
template <class> class C;
template <class T> C<T>::C(int) {}
EOF
clang++ test.cc

Assertion failed: (InjectedClassName && "couldn't find injected class name"),
function getConstructorName, file
/Users/ajo/Desktop/push.root/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp, line
118.
Stack dump:
0.      Program arguments: /Users/ajo/Desktop/push.root/llvm/build/bin/clang-7
-cc1 -triple x86_64-apple-macosx10.11.0 -Wdeprecated-objc-isa-usage
-Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free
-main-file-name test.cc -mrelocation-model pic -pic-level 2 -mthread-model
posix -mdisable-fp-elim -masm-verbose -munwind-tables
-faligned-alloc-unavailable -target-cpu core2 -dwarf-column-info
-debugger-tuning=lldb -target-linker-version 264.3.102 -resource-dir
/Users/ajo/Desktop/push.root/llvm/build/lib/clang/7.0.0 -stdlib=libc++
-fdeprecated-macro -fdebug-compilation-dir
/Users/ajo/Desktop/push.root/llvm/projects/libcxx -ferror-limit 19
-fmessage-length 123 -stack-protector 1 -fblocks
-fencode-extended-block-signature -fregister-global-dtors-with-atexit
-fobjc-runtime=macosx-10.11.0 -fcxx-exceptions -fexceptions -fmax-type-align=16
-fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/1z/jvnkrdws621c6wmrcf7q_9180000gn/T/test-413f92.o -x c++ test.cc 
1.      test.cc:2:27: current parser token '('
0  clang-7                  0x0000000106a60ec8
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1  clang-7                  0x0000000106a60155 llvm::sys::RunSignalHandlers() +
85
2  clang-7                  0x0000000106a61532 SignalHandler(int) + 274
3  libsystem_platform.dylib 0x00007fff8fc6f52a _sigtramp + 26
4  clang-7                  0x000000010857fc8e
clang::ASTContext::CreateTypeSourceInfo(clang::QualType, unsigned int) const +
62
5  libsystem_c.dylib        0x00007fff988216df abort + 129
6  libsystem_c.dylib        0x00007fff987e8dd8 basename + 0
7  clang-7                  0x0000000108194267
clang::Sema::getConstructorName(clang::IdentifierInfo&, clang::SourceLocation,
clang::Scope*, clang::CXXScopeSpec&, bool) + 327
8  clang-7                  0x0000000107c38350
clang::Parser::ParseUnqualifiedId(clang::CXXScopeSpec&, bool, bool, bool, bool,
clang::OpaquePtr<clang::QualType>, clang::SourceLocation*,
clang::UnqualifiedId&) + 1680
9  clang-7                  0x0000000107c087fa
clang::Parser::ParseDirectDeclarator(clang::Declarator&) + 1898
10 clang-7                  0x0000000107c07d48
clang::Parser::ParseDeclaratorInternal(clang::Declarator&, void
(clang::Parser::*)(clang::Declarator&)) + 3128
11 clang-7                  0x0000000107c7ed6f
clang::Parser::ParseSingleDeclarationAfterTemplate(clang::DeclaratorContext,
clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject&,
clang::SourceLocation&, clang::ParsedAttributes&, clang::AccessSpecifier) +
1535
12 clang-7                  0x0000000107c7e3ee
clang::Parser::ParseTemplateDeclarationOrSpecialization(clang::DeclaratorContext,
clang::SourceLocation&, clang::ParsedAttributes&, clang::AccessSpecifier) +
1310
13 clang-7                  0x0000000107c7dcfb
clang::Parser::ParseDeclarationStartingWithTemplate(clang::DeclaratorContext,
clang::SourceLocation&, clang::ParsedAttributes&, clang::AccessSpecifier) + 155
14 clang-7                  0x0000000107bf8d85
clang::Parser::ParseDeclaration(clang::DeclaratorContext,
clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 597
15 clang-7                  0x0000000107c8bf2e
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 2126
16 clang-7                  0x0000000107c8af6b
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 603
17 clang-7                  0x0000000107beb235 clang::ParseAST(clang::Sema&,
bool, bool) + 453
18 clang-7                  0x0000000107174a1c clang::FrontendAction::Execute()
+ 76
19 clang-7                  0x000000010712e221
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1233
20 clang-7                  0x0000000107206f57
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1495
21 clang-7                  0x00000001050372a4 cc1_main(llvm::ArrayRef<char
const*>, char const*, void*) + 1876
22 clang-7                  0x00000001050358d2 main + 12130
23 libdyld.dylib            0x00007fff99e345ad start + 1

-- 
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/20180724/2695bfd1/attachment.html>


More information about the llvm-bugs mailing list