<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 `oldBlock->capturesCXXThis() == blockScope->isCXXThisCaptured()"
   href="https://llvm.org/bugs/show_bug.cgi?id=24550">24550</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion `oldBlock->capturesCXXThis() == blockScope->isCXXThisCaptured()
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.7
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>benjamin@tudos.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=14765" name="attach_14765" title="run script">attachment 14765</a> <a href="attachment.cgi?id=14765&action=edit" title="run script">[details]</a></span>
run script

Compiling the code below with -fblocks causes clang to trigger it's own
assertion. The run script is attached as requested, the preprocessed source
code looks identical to the code below.

[ --- code --- ]

typedef void (^Block)();

void invoke_block (Block block);

// --- a class

class A
{
public:
    int f () { return 0; }
};

// --- template base class ---

template<class T>
class Base
{
public:
    T * t;

    virtual void virtual_function () {}
};

// --- derive from template base class

template<class T>
class Derv : public Base<T>
{
    virtual void virtual_function ();
};

template<class T>
void Derv<T>::virtual_function ()
{
    invoke_block (^() {
        int i = Base<T>::t->f ();
    });
}

int main(int argc, char **argv)
{
    Derv<A> d;

    return 0;
}

[ --- end of code --- ]</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>