[LLVMbugs] [Bug 18653] New: Abort after class declaration as template argument

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jan 29 00:24:35 PST 2014


            Bug ID: 18653
           Summary: Abort after class declaration as template argument
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: pkeir at outlook.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 11968
  --> http://llvm.org/bugs/attachment.cgi?id=11968&action=edit
The C++ code which produces the abort

The attached code causes clang to abort (core dump). The code provides a class
declaration as the template argument to a function call made within a class
template method. I believe this is a C++11 feature, and so I provide the
-std=c++11 flag; though the same error occurs without it.

clang++ -c -std=c++11 declbug.cpp

If I instead declare class newclass outside a code scope, for example outside
the class template, (so changing to external linkage), the abort disappears.

The errors produced start with:

llvm::PointerUnion<Decl *, LocalInstantiationScope::DeclArgumentPack *>
*clang::LocalInstantiationScope::findInstantiationOf(const clang::Decl *):
Assertion `isa<LabelDecl>(D) && "declaration not instantiated in this scope"'

clang++ --version provides:

clang version 3.4 (ssh://superserver/var/lib/git/clang.git
Target: x86_64-unknown-linux-gnu
Thread model: posix

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/20140129/e8946134/attachment.html>

More information about the llvm-bugs mailing list