<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 3.6 regression: noexcept expression doesn't seem to pick up global function overload"
   href="https://llvm.org/bugs/show_bug.cgi?id=25694">25694</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang 3.6 regression: noexcept expression doesn't seem to pick up global function overload
          </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>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++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-clang-bugs@synopsys.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This is reproducible in the trunk.

$ cat test.cpp
int a, b;
template<class T> void swap(T&, T&); 
template<class T> struct foo
{
  void swap(foo<T>& _Right) noexcept(noexcept(swap(a, b)))
  {}
};

template<class T>
void swap(foo<T>& Left, foo<T>& Right) noexcept(noexcept(Left.swap(Right)))
{}

void test()
{
  foo<int> p1, p2;
  swap(p1, p2);
}

$ ./clang-3.5.0/bin/clang -c -std=c++11 test.cpp

$ ./clang-3.6.0/bin/clang -c -std=c++11 test.cpp
test.cpp:5:55: error: too many arguments to function call, expected single
argument '_Right', have 2 arguments
  void swap(foo<T>& _Right) noexcept(noexcept(swap(a, b)))
                                              ~~~~    ^
test.cpp:10:58: note: in instantiation of exception specification for 'swap'
requested here
void swap(foo<T>& Left, foo<T>& Right) noexcept(noexcept(Left.swap(Right)))
                                                         ^
test.cpp:16:3: note: in instantiation of exception specification for
'swap<int>' requested here
  swap(p1, p2);
  ^
test.cpp:5:3: note: 'swap' declared here
  void swap(foo<T>& _Right) noexcept(noexcept(swap(a, b)))
  ^
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>