<html>
    <head>
      <base href="https://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 --- - Assertion failed: isa<X>(Val) && "cast<Ty>() argument of incompatible type!""
   href="https://llvm.org/bugs/show_bug.cgi?id=28503">28503</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failed: isa<X>(Val) && "cast<Ty>() argument of incompatible type!"
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.8
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </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>Frontend
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>jtony@ca.ibm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Steps to reproduce on linux:
-bash-4.2$ cat r.cpp
  template <class ...U> struct T {
        int bar() throw(U...)
        {
                return sizeobar...(U);
        }
};

template <class ...U> auto bar(U... args) -> T<decltype(args)...>
{
        return T<decltype(args)...>();
}

int main()
{
if ( bar ( bar<> ) . bar ( ) )
        return 0;
}

-bash-4.2$ myclang++ r.cpp  -std=c++11
r.cpp:4:10: error: use of undeclared identifier 'sizeobar'; did you mean
'sizeof'?
                return sizeobar...(U);
                       ^~~~~~~~
                       sizeof
clang: /home/jtony/build/3_8/llvm-dev.src/include/llvm/Support/Casting.h:237:
typename llvm::cast_retty<X, Y*>::ret_type llvm::cast(Y*) [wit
h X = clang::TemplateTemplateParmDecl; Y = clang::NamedDecl; typename
llvm::cast_retty<X, Y*>::ret_type = clang::TemplateTemplateParmDecl*]:
 Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
0  clang     0x000000001568c4e4 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
+ 68
1  clang     0x000000001568c8d4


...
clang version 3.8.0 (tags/RELEASE_380/final)
Target: powerpc64le-unknown-linux-gnu
Thread model: posix


-bash-4.2$ type myclang
myclang is aliased to `/home/jtony/build/runnable/bin/clang'</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>