<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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-cl confuses variable method with class constructor when named the same, within noexcept(...)"
   href="https://bugs.llvm.org/show_bug.cgi?id=37030">37030</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang-cl confuses variable method with class constructor when named the same, within noexcept(...)
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>6.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>other
          </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>jtfrederico@hrl.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=20168" name="attach_20168" title="Example of bug">attachment 20168</a> <a href="attachment.cgi?id=20168&action=edit" title="Example of bug">[details]</a></span>
Example of bug

Overview
========

When trying to automatically determine if a templated method is noexcept,
clang-cl confuses an argument's method for the class's constructor when named
the same. It also seems to be unable to find the variable's method. It's
easiest to refer to the simple example I've created, see attached.

Steps to Reproduce
==================

Compile the example main.cpp file with clang-cl, no extra switches required.

Actual Results
==============

When compiling main.cpp with clang-cl, a warning and two errors are produced.

Line 17 warning: explicit constructor calls are a Microsoft extension. It
appears that the compiler is mistaking `bar()' part of `t.bar()' for the
constructor for the class `bar'.

Line 17 error: no member named 'bar' in 'A': This isn't true, there is a member
`bar' in `A'.

Line 17 error: no member named 'bar' in 'B': This isn't true, there is a member
`bar' in `B'.

Expected Results
================

A working binary.

Build Date & Hardware
=====================

Windows 7 Clang-cl 5.0.1 64-bit from <a href="http://releases.llvm.org/download.html">http://releases.llvm.org/download.html</a>.

Additional Builds and Platforms
===============================

MacOS 10.12.6, Clang-cl 5.0.1 and 6.0.0 from macports has this bug as well. I
don't quite know how clang-cl exists on MacOS, but it does.

Additional Information
======================

Clang (on MacOS) and clang++ do not have this issue and produce working
binaries when using the flag -std=c++11.</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>