Prazek added a comment.

In https://reviews.llvm.org/D25316#564217, @malcolm.parsons wrote:

> In https://reviews.llvm.org/D25316#563930, @Prazek wrote:
>
> > Please add tests with
> >
> >   long long p = static_cast<long long>(4);
> >   
> >
> > and the same with const at beginning. I remember I had problems with this 
> > last time (Type->SourceRange was returning only source range for the first 
> > token.
>
>
> BuiltinTypeLoc only returns the first token:
>
>   SourceRange getLocalSourceRange() const {
>     return SourceRange(getBuiltinLoc(), getBuiltinLoc());
>   }
>   
>
> The existing check fails too:
>
>   -long long *ll = new long long();
>   +auto long *ll = new long long();


Interesting! I remember checking it half year ago, and it was working 
(SourceRange was returning all tokens from first one
to asterisk). I remember there was some small features introduced, like instead 
of
auto p = long long new;
to produce
auto *p = long long new;

Maybe it was introduced in that patch. Anyway I think this have to be fixed 
somehow. Either by playing with lexer, or by fixing sourceRange


https://reviews.llvm.org/D25316



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to