<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 --- - Inline namespaces are not considered when declaring a variable using qualified name"
   href="http://llvm.org/bugs/show_bug.cgi?id=17560">17560</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Inline namespaces are not considered when declaring a variable using qualified name
          </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>Linux
          </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>tuomas.tynkkynen@iki.fi
          </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>Created <span class=""><a href="attachment.cgi?id=11364" name="attach_11364" title="The failing testcase">attachment 11364</a> <a href="attachment.cgi?id=11364&action=edit" title="The failing testcase">[details]</a></span>
The failing testcase

The following program is rejected by latest trunk clang:

namespace A {
    inline namespace B {
        extern int t;
    }
}
int A::t;

Compiler output:
tmtynkky@e42-7:~/cppgm$ clang++ -xc++ -std=c++11 -pedantic -c -o /dev/null
definition-via-inline-namespace.cpp

definition-via-inline-namespace.cpp:7:8: error: no member named 't' in
namespace 'A'
int A::t;
    ~~~^
1 error generated.

According to 3.4.3.2p7 of the spec, the member A::B::t should be found with the
name A::t via inline namespace lookup:

"In a declaration for a namespace member in which the declarator-id is a
qualified-id, given that the qualified-id for the namespace member has the form
``nested-name-specifier unqualified-id'', the unqualified-id shall name a
member of the namespace designated by the nested-name-specifier or of an
element of the inline namespace set (7.3.1) of that namespace."

GCC trunk accepts this code (likely by accident, since it has similar bugs in
cases like this)

Version info:
clang version 3.4 (trunk 186244)
Target: x86_64-unknown-linux-gnu</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>