<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 --- - r279314 broke modules selfhost"
   href="https://llvm.org/bugs/show_bug.cgi?id=29097">29097</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>r279314 broke modules selfhost
          </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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Modules
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>richard-llvm@metafoo.co.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>biancacristinacristescu@gmail.com, dexonsmith@apple.com, dgregor@apple.com, llvm-bugs@lists.llvm.org, vvasilev@cern.ch
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Clang modules selfhost bots are currently failing during IR emission with:

clang-3.8:
/home/buildbot/modules-slave-1/clang-x86_64-linux-selfhost-modules/llvm.src/tools/clang/include/clang/AST/ExprCXX.h:1067:
clang::Expr *clang::CXXDefaultInitExpr::getExpr(): Assertion
`Field->getInClassInitializer() && "initializer hasn't been parsed"' failed.
[...]
3.   
/home/buildbot/modules-slave-1/clang-x86_64-linux-selfhost-modules/llvm.src/include/llvm/ADT/ilist.h:199:3:
Generating code for declaration
'llvm::ilist_iterator<llvm::Instruction>::ilist_iterator'

I would guess the problem is that we merged multiple FieldDecls together, and
then asked the wrong declaration of the field for its initializer. (It's valid
for one FieldDecl for a field to have an initializer and another FieldDecl to
not have one, since we lazily instantiate the initializer if the field is a
member of a class template, and we don't attempt to accomodate that.)

Once we have a reduced testcase, we can presumably fix this by copying the
initializer onto the canonical declaration whenever we merge FieldDecls, and
making FieldDecl::getInClassInitializer look on the canonical declaration.</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>