On May 22, 2013, at 12:21 , Ted Kremenek <[email protected]> wrote:

> On May 22, 2013, at 12:00 PM, Jordan Rose <[email protected]> wrote:
> 
>> Also, since line numbers are expensive to compute, perhaps it's better to 
>> ask if there's a newline between the two source locations. (Actually, that 
>> sounds like a useful function on SourceManager...)
> 
> Does such a query exist?  I also suspect the performance charectistics here 
> don't matter in practice.


Roughly, StringRef(LHS.getCharacterData(), RHS.getCharacterData() - 
LHS.getCharacterData()).find_first_of("\n\r") == StringRef::npos. But sure, 
line tables are at least cached so this won't be a huge problem.

Jordan
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to