Answered on the review thread. The problem is with BuiltinTypeLoc not
storing the location for the end token of builtin type names consisting of
multiple tokens. This can be worked around by re-lexing a fragment of the
code for now.

Richard, does it make sense to store the end location in BuiltinTypeLoc?

On Tue, Mar 1, 2016 at 3:30 PM, Piotr Padlewski <piotr.padlew...@gmail.com>
wrote:

> review:
> http://reviews.llvm.org/D17765
>
> 2016-03-01 15:12 GMT+01:00 Piotr Padlewski <piotr.padlew...@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 <ale...@google.com>:
>>
>>> +cfe-commits for wider audience.
>>>
>>> Hi Piotr,
>>>
>>> On Tue, Mar 1, 2016 at 2:36 PM, Piotr Padlewski <
>>> piotr.padlew...@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
>>>
>>
>>
>
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to