On May 22, 2013, at 11:59 , Jordan Rose <[email protected]> wrote:

> Yeah, this is pretty much what I was thinking as well; the missing piece in 
> my mind was that it has to run after regular optimization has hit its 
> steady-state. But why is this pass working on statement-locations, instead of 
> just flattening to a FullSourceLoc regardless of how the 
> PathDiagnosticLocation was specified? (PathDiagnosticLocation::asLocation).
> 
> 
> On May 22, 2013, at 11:52 , Ted Kremenek <[email protected]> wrote:
> 
>> +      PathPieces::iterator PieceToErase = I;
>> +      ++I;
>> +      erased = true;
>> +      path.erase(PieceToErase);
> 
> This is better written "I = path.erase(I)" (and still "erased = true", of 
> course).

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...)

Jordan

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

Reply via email to