<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 --- - Compilation error in namespace alias (7.3.2) due to r253283"
   href="https://llvm.org/bugs/show_bug.cgi?id=25731">25731</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Compilation error in namespace alias (7.3.2) due to r253283
          </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>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++
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>sgundapa@codeaurora.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=15394" name="attach_15394" title="Test case">attachment 15394</a> <a href="attachment.cgi?id=15394&action=edit" title="Test case">[details]</a></span>
Test case

As per standard
7.3.2 Namespace alias
In a declarative region, a namespace-alias-definition can be used to redefine a
namespace-alias declared in
that declarative region to refer only to the namespace to which it already
refers. [ Example: the following
declarations are well-formed:
namespace Company_with_very_long_name { / ... / }
namespace CWVLN = Company_with_very_long_name;
namespace CWVLN = Company_with_very_long_name; // OK: duplicate
namespace CWVLN = CWVLN;
—end example ]

The offending commit is r253283

I have attached a simple test.cpp to reproduce the error

$ clang++ -c test.cpp

/tmp/test.cpp:10:11: error: reference to 'alias' is ambiguous
  int i = alias::var;
          ^
/tmp/test.cpp:9:13: note: candidate found by name lookup is 'alias'
  namespace alias  = sgundapa;
            ^
/tmp/test.cpp:8:13: note: candidate found by name lookup is 'alias'
  namespace alias  = sgundapa;
            ^
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>