SourceTypeInfo for long long

Piotr Padlewski via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 1 06:30:19 PST 2016


review:
http://reviews.llvm.org/D17765

2016-03-01 15:12 GMT+01:00 Piotr Padlewski <piotr.padlewski at gmail.com>:

> my pass works for things like
> (note that for test purposes I use lexical_cast that doesn't do anything,
> so the second one compiles)
>
> int a = boost::lexical_cast<int>("42");
> long long* b = boost::lexical_cast<long long*>("42");
>
> =>
> auto a = boost::lexical_cast<int>("42");
> auto b = boost::lexical_cast<long long*>("42");
>
> but it doesnt work for
> long long a = boost::lexical_cast<long long>("42");
> =>
> auto long a = boost::lexical_cast<long long>("42");
>
> I will post review in few minutes.
>
>
> 2016-03-01 15:09 GMT+01:00 Alexander Kornienko <alexfh at google.com>:
>
>> +cfe-commits for wider audience.
>>
>> Hi Piotr,
>>
>> On Tue, Mar 1, 2016 at 2:36 PM, Piotr Padlewski <
>> piotr.padlewski at gmail.com> wrote:
>>
>>> Hi Alexey,
>>>
>> I am currently writing new check
>>> https://llvm.org/bugs/show_bug.cgi?id=26763
>>>
>>
>> Awesome! Sorry I didn't have time yet to comment on the issues you filed,
>> though I have a couple of thoughts.
>>
>>
>>>
>>> I have problem with SourceTypeInfo. I am doing the same thing as
>>> modernize-use-auto (for new expression) does, but it doesn't work for non
>>> pointer types.
>>>
>>
>> If you point me to the code, it will be easier to answer your question.
>> Currently I can only guess what you're talking about.
>>
>>
>>> I have checked, and my code works for pointers types like long long.
>>>
>>
>> What do you mean by `long long` being a `pointer type`?
>>
>> In any case, without seeing the code it's hard to answer your question.
>> You can upload a patch to reviews.llvm.org and add a test case that
>> fails for you (or another good way to reproduce the issue you're facing).
>>
>>
>>>
>>> Am I doing something wrong, or is it just bug in SourceTypeInfo.getEnd()?
>>>
>>> Piotr
>>>
>>
>> -- Alexander
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160301/92c9f35b/attachment.html>


More information about the cfe-commits mailing list