<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 failure in clang::Sema::BuildDelegatingInitializer"
   href="https://bugs.llvm.org/show_bug.cgi?id=39972">39972</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failure in clang::Sema::BuildDelegatingInitializer
          </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>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>C++'17
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>hokein@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat test-clang__Sema__BuildDelegatingInitializer.cc
class a {
  struct b {           operator a(
  } template <typename> using c = b : a() : a(c<int>()) {%                      
$  ./clang test-clang__Sema__BuildDelegatingInitializer.cc -std=c++17
test-clang__Sema__BuildDelegatingInitializer.cc:3:3: error: expected parameter
declarator
  } template <typename> using c = b : a() : a(c<int>()) {
  ^
test-clang__Sema__BuildDelegatingInitializer.cc:3:3: error: expected ')'
test-clang__Sema__BuildDelegatingInitializer.cc:2:34: note: to match this '('
  struct b {           operator a(
                                 ^
test-clang__Sema__BuildDelegatingInitializer.cc:2:35: error: expected ';' at
end of declaration list
  struct b {           operator a(
                                  ^
                                  ;
test-clang__Sema__BuildDelegatingInitializer.cc:3:4: error: expected ';' after
struct
  } template <typename> using c = b : a() : a(c<int>()) {
   ^
   ;
test-clang__Sema__BuildDelegatingInitializer.cc:3:37: error: expected ';' after
alias declaration
  } template <typename> using c = b : a() : a(c<int>()) {
                                    ^
                                    ;
test-clang__Sema__BuildDelegatingInitializer.cc:3:58: error: expected '}'
  } template <typename> using c = b : a() : a(c<int>()) {
                                                         ^
test-clang__Sema__BuildDelegatingInitializer.cc:1:9: note: to match this '{'
class a {
        ^
WARNING: Logging before InitGoogle() is written to STDERR
F1212 11:27:25.973386  220045 logging.cc:82] assert.h assertion failed at
third_party/llvm/llvm/include/llvm/Support/Casting.h:255 in typename
cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = clang::CXXConstructExpr, Y =
clang::Expr]: isa<X>(Val) && "cast<Ty>() argument of incompatible type!"
*** Check failure stack trace: ***
    @     0x559961def08b  clang::Sema::BuildDelegatingInitializer()
    @     0x559961dee3a2  clang::Sema::BuildBaseInitializer()
    @     0x559961decc4a  clang::Sema::BuildMemInitializer()
    @     0x559961ded4cd  clang::Sema::ActOnMemInitializer()
    @     0x55996193027b  clang::Parser::ParseMemInitializer()
    @     0x55996192f5ec  clang::Parser::ParseConstructorInitializer()
    @     0x5599618cb7b1  clang::Parser::ParseLexedMethodDef()
    @     0x5599618ca175  clang::Parser::ParseLexedMethodDefs()
    @     0x559961928aa2  clang::Parser::ParseCXXMemberSpecification()
    @     0x559961926edf  clang::Parser::ParseClassSpecifier()
    @     0x55996193f443  clang::Parser::ParseDeclarationSpecifiers()
    @     0x5599618b4c90  clang::Parser::ParseDeclOrFunctionDefInternal()
    @     0x5599618b49ec  clang::Parser::ParseDeclarationOrFunctionDefinition()
    @     0x5599618b3637  clang::Parser::ParseExternalDeclaration()
    @     0x5599618b23ff  clang::Parser::ParseTopLevelDecl()
    @     0x5599618b1f98  clang::Parser::ParseFirstTopLevelDecl()
    @     0x5599618ad1e5  clang::ParseAST()
    @     0x5599616d47a3  clang::FrontendAction::Execute()
    @     0x5599615561e1  clang::CompilerInstance::ExecuteAction()
    @     0x559960a2f5e5  clang::ExecuteCompilerInvocation()</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>