On May 22, 2013, at 11:59 AM, 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). We at least need to check if the target of the edge is the condition of a terminator. But you are right, after that point it probably doesn't matter, but using statement-locations preserves an invariant through the rest of optimizeEdges in that we only remove edges for which we understand their semantic intent. For example, some edges are added to closing braces, etc., and those are intended to never be removed. We possibly don't want to preserve that invariant here. > > > 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). Got it. Will fix.
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
