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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to