<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 --- - Control-flow gets confused when assert(false) is in a try-block."
   href="http://llvm.org/bugs/show_bug.cgi?id=19433">19433</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Control-flow gets confused when assert(false) is in a try-block.
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </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>Static Analyzer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>kremenek@apple.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mclow.lists@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>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=12372" name="attach_12372" title="Small program demonstrating the problem.">attachment 12372</a> <a href="attachment.cgi?id=12372&action=edit" title="Small program demonstrating the problem.">[details]</a></span>
Small program demonstrating the problem.

I tried running scan_build on the libc++ test suite, and got a false positive.

there's a reduced example attached, but basically, the code in question looks
like:

list<int> l;
int foo = l.count();
try {
   l.insert(5);
   assert(false);
   }
catch (...) {}
assert ( foo == l.count());

where the call to "l.insert" will throw.

scan-build complains that "foo" is initialized but never read.
[ and yes, I have exceptions enabled ]

If I remove the assert(false), then the warning goes away.</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>