On Mon, Jun 8, 2015 at 9:36 PM, Richard Smith <[email protected]> wrote:
> That looks fine (although perhaps keep the creation of the attribute outside
> the `if` so you don't need to duplicate it in both arms).

Fixed

>> > 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`.
>>
>>
>> This probably belongs to a separate patch (for starters, I don't have a
>> test demonstrating that compiler is currently acting incorrectly).
>
>
> That sounds fine. 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; }

OK -- will look into it.

> Your current test passes for me without your patch, so you need to change it
> *somehow*.

Ouch... It fails in C++ mode only -- I copied my code to existing *.c
test and forget to check that it fails without the patch. :-(

Either way, this is fixed; please review updated patch:
http://reviews.llvm.org/D10187.

Yours,
Andrey
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to