<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 --- - Clang reports copy constructor being implicitly deleted when it's not called in C++11 mode"
   href="https://llvm.org/bugs/show_bug.cgi?id=27671">27671</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang reports copy constructor being implicitly deleted when it's not called in C++11 mode
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.5
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </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++11
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>wanyingloo@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org, sig-rnd-sat-clang-bugs@synopsys.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The following code compiles successfully in Clang 3.4 and GCC 5.2. Clang 3.5
and higher issues an error in C++11 mode.

$ cat test.cpp
struct Base
{
  Base();
private:
  Base(const Base&);
};
struct D: public Base
{
  D(char*) {}
};
void func() {
  (void)new D("");
}

$ /opt/pkg/gcc-5.2.0/bin/g++ -c -w -std=c++11 test.cpp

$ /opt/pkg/clang-3.4/bin/clang -c -w -std=c++11 test.cpp

$ /opt/pkg/clang-3.5.0/bin/clang -c -w test.cpp

$ /opt/pkg/clang-3.5.0/bin/clang -c -w -std=c++11 test.cpp
test.cpp:12:13: error: call to implicitly-deleted copy constructor of 'D'
  (void)new D("");
            ^ ~~
test.cpp:7:11: note: copy constructor of 'D' is implicitly deleted because base
class 'Base' has an
      inaccessible copy constructor
struct D: public Base
          ^
1 error generated.</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>