[PATCH] D25363: Store a SourceRange for multi-token builtin types
Piotr Padlewski via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 9 05:58:38 PDT 2016
Prazek added a comment.
In https://reviews.llvm.org/D25363#565445, @malcolm.parsons wrote:
> In https://reviews.llvm.org/D25363#565371, @Prazek wrote:
>
> > Thanks for the patch! I think some unit test should be added.
>
>
> Are there any existing unit tests for TypeLoc that I can add to?
>
> > Do you also handle cases like
> >
> > unsigned long long
>
> Yes - see tests in https://reviews.llvm.org/D25316.
>
> > The problem here is that the whole type like "unsigned long long" could be in other tokens.
> > I talked with Richard Smith while ago and one of the solutions proposed was to have "isValid()" for source range
> > returning false for cases like this
> >
> > unsigned const long
>
> I see. I hope that's a rare case that I can ignore for now.
I think there are some. Look at unittests/AST/ or unittests/ASTMatchers/. Sorry for being not so precise, but can't check it right now. I can check it later if you won't find it.
https://reviews.llvm.org/D25363
More information about the cfe-commits
mailing list