[LLVMbugs] [Bug 23923] New: "redefine_extname" pragma handled incorrectly in case of a local var with the same name

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jun 23 03:45:01 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23923

            Bug ID: 23923
           Summary: "redefine_extname" pragma handled incorrectly in case
                    of a local var with the same name
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: andreybokhanko at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

This bug report captures what Richard Smith wrote in a code review message
(http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150608/130447.html):

> 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`.
...
> Here's a trivial testcase (it's easy to cook up more, the
bug is quite blatant):
> 
> #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.

Yours,
Andrey Bokhanko
===============
Software Engineer
Intel Compiler Team
Intel

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150623/63771be7/attachment.html>


More information about the llvm-bugs mailing list