Finding the next SourceLocation of a SourceLocation

Hi ,

Can anyone show me how to find the adjacent or next SourceLocation of a SourceLocation?

What exactly are you trying to do? SourceLocation is just an index into a source buffer, so the next one would be just +1.

Hi Nikola,

I am trying to find the last include in a file and then create a fixit hint to point to the next whitespace to
include the file (bug 5835) . I have written a PPCallback class which locates the last include directive and now i need to find the adjacent location to last include directive . (which is hopefully a whitespace)
So I can just use the plus operator , then ?

Have a look at Lexer::findLocationAfterToken