<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: (blockScope->CaptureMap.count(newCapture)), function TransformBlockExpr, file TreeTransform.h, line 10764"
   href="https://llvm.org/bugs/show_bug.cgi?id=25001">25001</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failed: (blockScope->CaptureMap.count(newCapture)), function TransformBlockExpr, file TreeTransform.h, line 10764
          </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>Frontend
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>compnerd@compnerd.org
          </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>Created <span class=""><a href="attachment.cgi?id=14961" name="attach_14961" title="reduced.c">attachment 14961</a> <a href="attachment.cgi?id=14961&action=edit" title="reduced.c">[details]</a></span>
reduced.c

The attached reduced test case causes the assertion to be tripped.  It seems
that the there is a case where the diagnostics engine in the sema does not
indicate an error has occurred even though one has.  This results in us trying
to validate the variable captures in the block which results in the assertion
being triggered.

The naming of the external function and the parameter to the function here are
relevant as that is the cause of the error, but changing the names seems to
cause the error to be reported correctly.

This may be some edge case interaction between the fuzzy name lookup and error
reporting for recovery in parsing resulting in the error being reported later.</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>