<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 --- - Assertion failure writing .ast files when class data member initializers contain Block expressions"
   href="http://llvm.org/bugs/show_bug.cgi?id=20594">20594</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion failure writing .ast files when class data member initializers contain Block expressions
          </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>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>Frontend
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>thonermann@coverity.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>The following test cases compile to object code successfully, but fail an
assertion when a .ast file is emitted.  The assertion failure has been
reproduced with Clang 3.4 and Clang trunk (r214770).

$ cat t.cpp
struct S {
    static void(^bp)();
};
void(^S::bp)() = ^{};

$ cat t-cxx11.cpp
struct S {
    void(^bp)() = ^{};
};

$ clang --version
clang version 3.6.0 (trunk 214770)
Target: x86_64-unknown-linux-gnu
Thread model: posix

$ clang -fblocks -c t.cpp
<no error>

$ clang -fblocks -c t.cpp -emit-ast
clang: .../lib/AST/DeclBase.cpp:701: bool
clang::Decl::AccessDeclContextSanity() const: Assertion `Access != AS_none &&
"Access specifier is AS_none inside a record decl"' failed.
...

$ clang -fblocks -std=c++11 -c t-cxx11.cpp
<no error>

$ clang -fblocks -std=c++11 -c t-cxx11.cpp -emit-ast
clang: .../lib/AST/DeclBase.cpp:701: bool
clang::Decl::AccessDeclContextSanity() const: Assertion `Access != AS_none &&
"Access specifier is AS_none inside a record decl"' failed.
...</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>