<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Typedef inside template asserts when generating debug info"
   href="http://llvm.org/bugs/show_bug.cgi?id=21305">21305</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Typedef inside template asserts when generating debug info
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>LLVM Codegen
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>culda.rinon@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=13210" name="attach_13210" title="Asserting test case">attachment 13210</a> <a href="attachment.cgi?id=13210&action=edit" title="Asserting test case">[details]</a></span>
Asserting test case

Looks like rev 219900 broke generating debug info for typedef'd template types.
Attached is a reduced test case out of skia (gpu/gl/GrGLNameAllocator.cpp). The
test case works fine without the typedef, but asserts with the typedef:

clang: /hdd/sjcrane/multicompiler/src/include/llvm/Support/Casting.h:237:
typename llvm::cast_retty<X, Y*>::ret_type llvm::cast(Y*) [with X =
clang::MemberPointerType; Y = const clang::Type; typename llvm::cast_retty<X,
Y*>::ret_type = const clang::MemberPointerType*]: As
sertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
0  clang           0x0000000003745cde llvm::sys::PrintStackTrace(_IO_FILE*) +
38
1  clang           0x0000000003745f79
2  clang           0x0000000003744b0f
3  libpthread.so.0 0x00007f9f241a5cb0
4  libc.so.6       0x00007f9f231cc0d5 gsignal + 53
5  libc.so.6       0x00007f9f231cf83b abort + 379
6  libc.so.6       0x00007f9f231c4d9e
7  libc.so.6       0x00007f9f231c4e42
8  clang           0x000000000109beef
9  clang           0x000000000133d62a
clang::CodeGen::CGDebugInfo::CollectTemplateParams(clang::TemplateParameterList
const*, llvm::ArrayRef<clang::TemplateArgument>, llvm::DIFile) + 1322
10 clang           0x000000000133dcac
clang::CodeGen::CGDebugInfo::CollectFunctionTemplateParams(clang::FunctionDecl
const*, llvm::DIFile) + 120
11 clang           0x0000000001343b48
clang::CodeGen::CGDebugInfo::EmitFunctionStart(clang::GlobalDecl,
clang::SourceLocation, clang::SourceLocation, clang::QualType, llvm::Function*,
llvm::IRBuilder<true, llvm::ConstantFolder,
clang::CodeGen::CGBuilderInserter<true> >&)
+ 1324
12 clang           0x00000000013a4fc2
clang::CodeGen::CodeGenFunction::StartFunction(clang::GlobalDecl,
clang::QualType, llvm::Function*, clang::CodeGen::CGFunctionInfo const&,
clang::CodeGen::FunctionArgList const&, clang::SourceLocation,
clang::SourceLocation) + 2010
13 clang           0x00000000013a6067
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 861
14 clang           0x00000000013bad4a
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl,
llvm::GlobalValue*) + 1248
15 clang           0x00000000013b7dbc
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*) + 416
16 clang           0x00000000013b6973
clang::CodeGen::CodeGenModule::EmitDeferred() + 321
17 clang           0x00000000013b33fb clang::CodeGen::CodeGenModule::Release()
+ 25
18 clang           0x000000000132e9d1
19 clang           0x000000000131724a
20 clang           0x00000000015bdb54 clang::ParseAST(clang::Sema&, bool, bool)
+ 776
21 clang           0x000000000104b59c clang::ASTFrontendAction::ExecuteAction()
+ 322
22 clang           0x00000000013198f5 clang::CodeGenAction::ExecuteAction() +
1467
23 clang           0x000000000104b077 clang::FrontendAction::Execute() + 139
24 clang           0x0000000001011a56
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 770
25 clang           0x0000000000fd2ac7
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 993
26 clang           0x0000000000fbf6a0 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 770
27 clang           0x0000000000fccba0
28 clang           0x0000000000fcd180 main + 1067
29 libc.so.6       0x00007f9f231b776d __libc_start_main + 237
30 clang           0x0000000000fbdd79</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>