<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:anders.granlund.0@gmail.com" title="Anders Granlund &lt;anders.granlund.0&#64;gmail.com&gt;"> <span class="fn">Anders Granlund</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_REOPENED " title="REOPENED --- - Name hiding in the same declarative region fails when done via using-directive" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24264&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=3y_9OH-Gr4U50iwWmgSDBhTEjeceJ1SVjhabxN0q2Gc&s=lmzUAmz1cUJh4nAkO7lq1JreUCNZ588T1kyCJAnzYNQ&e=">bug 24264</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>RESOLVED
           </td>
           <td>REOPENED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>INVALID
           </td>
           <td>---
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED " title="REOPENED --- - Name hiding in the same declarative region fails when done via using-directive" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24264-23c2&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=3y_9OH-Gr4U50iwWmgSDBhTEjeceJ1SVjhabxN0q2Gc&s=Nywsbont2B73GDLRFfMUolec5ekzg-joMBhbE47J-cU&e=">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED " title="REOPENED --- - Name hiding in the same declarative region fails when done via using-directive" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24264&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=3y_9OH-Gr4U50iwWmgSDBhTEjeceJ1SVjhabxN0q2Gc&s=lmzUAmz1cUJh4nAkO7lq1JreUCNZ588T1kyCJAnzYNQ&e=">bug 24264</a>
              from <span class="vcard"><a class="email" href="mailto:anders.granlund.0@gmail.com" title="Anders Granlund &lt;anders.granlund.0&#64;gmail.com&gt;"> <span class="fn">Anders Granlund</span></a>
</span></b>
        <pre>Yes, but by [namespace.udir]/2 during the unqualified name lookup of x in
sizeof (x), the declaration struct x {}; appears as if it was declared in the
declarative region of the global namespace, so the name lookup will appear to
be affected by the type of name hiding described in [basic.scope.hiding]/2.

Just like the way name lookup of  i  in the example below appears to be
affected by normal name hiding. When performing unqualified name lookup of  i 
in  f  the definition  static int i = 2;  appears to be made in the declarative
region of  T, and therefore appears to hide  i  in the definition  static int i
= 1;  That is why we get the result 2 printed out in the example below:

  #include <iostream>
  static int i = 1;
  namespace T {
    namespace N { static int i = 2; }
    namespace M {
      using namespace N;
      void f() { std::cout << i << std::endl; }
    }
  }
  int main() { T::M::f(); }

I still think the program in the bug report is well-formed because of this.</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>