<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 --- - An extra InitListExpr in r227424 likely caused by DR1467"
   href="http://llvm.org/bugs/show_bug.cgi?id=22465">22465</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>An extra InitListExpr in r227424 likely caused by DR1467
          </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>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>C++
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>lvoufo@gmail.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>For the source:

#include <initializer_list>

typedef std::initializer_list<bool> T;
struct A {
  A(T) {}
};

void f() {
  T x;
  A y = {x};
}

in r224592 we used to get with -ast-print for last function:

void f() {
    T x;
    A y = { x };
}

in r227424 we get:


void f() {
    T x;
    A y = { { { x } } };
}

The difference comes from different AST, r224592:

    `-DeclStmt 0x72db9a8 <line:10:3, col:12>
      `-VarDecl 0x72db1d0 <col:3, col:11> col:5 y 'struct A' cinit
        `-CXXConstructExpr 0x72db970 <col:9, col:11> 'struct A' 'void (T)'
          `-CXXConstructExpr 0x72db818 <col:10> 'T':'class
std::initializer_list<_Bool>' 'void (const class
std::initializer_list<_Bool> &) noexcept'
            `-ImplicitCastExpr 0x72db640 <col:10> 'const class
std::initializer_list<_Bool>' lvalue <NoOp>
              `-DeclRefExpr 0x72db228 <col:10> 'T':'class
std::initializer_list<_Bool>' lvalue Var 0x72dacb0 'x' 'T':'class
std::initializer_list<_Bool>'


while r227424:

    `-DeclStmt 0x8c99f08 <line:10:3, col:12>
      `-VarDecl 0x8c996e0 <col:3, col:11> col:5 y 'struct A' cinit
        `-CXXConstructExpr 0x8c99ed0 <col:9, col:11> 'struct A' 'void (T)'
          `-CXXConstructExpr 0x8c99d78 <col:9, col:11> 'T':'class
std::initializer_list<_Bool>' 'void (const class
std::initializer_list<_Bool> &) noexcept'
            `-InitListExpr 0x8c99b68 <col:9, col:11> 'const class
std::initializer_list<_Bool>' lvalue
              `-ImplicitCastExpr 0x8c99b50 <col:10> 'const class
std::initializer_list<_Bool>' lvalue <NoOp>
                `-DeclRefExpr 0x8c99738 <col:10> 'T':'class
std::initializer_list<_Bool>' lvalue Var 0x8c991c0 'x' 'T':'class
std::initializer_list<_Bool>'</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>