r195255 - When wrapping lazily generated builtins in an extern "C" context,

Richard Smith richard at metafoo.co.uk
Wed Nov 20 12:44:38 PST 2013


On Wed, Nov 20, 2013 at 12:29 PM, Enea Zaffanella <zaffanella at cs.unipr.it>wrote:

>
> On 11/20/2013 08:46 PM, Richard Smith wrote:
>
>> I suspect this is not currently visible to any in-tree code. Perhaps we
>> could teach -ast-dump to dump this flag, and test it that way.
>>
>
> It seems that -ast-print is able to show the difference ... but I can not
> tell if this is only happening by chance (the status of the pretty printer
> is unclear to me):
>
> $ cat a.cc
> float test() {
>   return __builtin_asinf(1.0);
> }
>
> Before the patch we were getting:
> $ clang++ -cc1 -ast-print a.cc
> float test() {
>     return __builtin_asinf(1.);
> }
>
>
> extern "C" extern float __builtin_asinf(float) __attribute__((nothrow))
> __attribute__((const))
> $
>
> After the patch, only function test() is printed out.


That makes sense; the ast printer tries to avoid printing implicit
declarations. Please add a test for that! =)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131120/e12fea5d/attachment.html>


More information about the cfe-commits mailing list