<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 --- - Undef in module included through pch causes assertion failure"
   href="http://llvm.org/bugs/show_bug.cgi?id=19215">19215</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Undef in module included through pch causes assertion failure
          </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>Modules
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>blangmuir@apple.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, 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=12264" name="attach_12264" title="reproducer">attachment 12264</a> <a href="attachment.cgi?id=12264&action=edit" title="reproducer">[details]</a></span>
reproducer

When we update the identifier info for a macro that has been undef'd, we set
its UndefLoc to the ImportLoc for the module.  However, if the undef is in a
module imported inside a pre-compiled header, that location will be invalid -
causing an assertion failure.

To reproduce:
1. download the attached reproducer and unzip it somewhere
2. run ./repro.sh with a recent clang in your path

I believe that this started in r202560, but I haven't actually bisected it.

As an interesting aside: there is no assertion failure if the macro name is
only one character long (change AB to A in the reproducer).</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>