<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 --- - &quot;redefine_extname&quot; pragma handled incorrectly in case of a local var with the same name" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23923&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=R4xqxg346llJLD5Dn3DMPr2p5qnKYnA0uE56Cs2n1Pw&s=c0dWRq7rfXe3r93phtCufoCg9cFonAjtQCRe3vxPvUU&e=">23923</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>"redefine_extname" pragma handled incorrectly in case of a local var with the same name
          </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>Frontend
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>andreybokhanko@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This bug report captures what Richard Smith wrote in a code review message
(<a href="http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150608/130447.html">http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150608/130447.html</a>):

<span class="quote">> We should also filter out internal-linkage declarations and non-TU-scope
> declarations when we perform the deferred handling of
> `ExtnameUndeclaredIdentifiers` in `ActOnVariableDeclarator` and
> `ActOnFunctionDeclarator`.</span >
...
<span class="quote">> Here's a trivial testcase (it's easy to cook up more, the</span >
bug is quite blatant):
<span class="quote">> 
> #pragma redefine_extname foo bar
> int f() {
>   int foo = 0;
>   return foo;
> }
> int foo() { return 1; }

> The redefine_extname gets applied to the local variable 'foo', and the
> global function 'foo' does not get renamed.</span >

Yours,
Andrey Bokhanko
===============
Software Engineer
Intel Compiler Team
Intel</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>