r182502 - [analyzer; alternate edges] remove puny edges on the same line that span less than 3 columns.

Jordan Rose jordan_rose at apple.com
Wed May 22 13:18:06 PDT 2013


On May 22, 2013, at 12:21 , Ted Kremenek <kremenek at apple.com> wrote:

> On May 22, 2013, at 12:00 PM, Jordan Rose <jordan_rose at apple.com> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130522/6fd65677/attachment.html>


More information about the cfe-commits mailing list