<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 --- - clang static analyser hangs during analysis of a block that calls itself"
   href="http://llvm.org/bugs/show_bug.cgi?id=18977">18977</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang static analyser hangs during analysis of a block that calls itself
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </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>schneider@iosphere.de
          </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=12153" name="attach_12153" title="zip archive with invocation and xcode project that can be used to reproduce the bug">attachment 12153</a> <a href="attachment.cgi?id=12153&action=edit" title="zip archive with invocation and xcode project that can be used to reproduce the bug">[details]</a></span>
zip archive with invocation and xcode project that can be used to reproduce the
bug

During Static analysis of the following code snippet clang hangs and will never
return.
Invocation and complete Xcode Project are attached.

Code snippet:
    void (^block)(void) = nil;

    for (int i = 0; i < 3; i++) {
        block = ^(void) {
            if (block) {
                block();
            }
        };
    }

    if (block) {
        block();
    }

Steps to reproduce:
Use Analyze in the attached Xcode Project.

OS version: OS X 10.9.2 

Clang version:
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix

Xcode version: 5.0.2</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>