r180741 - [analyzer] Change PathPieces to be a wrapper around an ilist of (through indirection) PathDiagnosticPieces.

Ted Kremenek kremenek at apple.com
Mon Apr 29 16:08:15 PDT 2013


On Apr 29, 2013, at 4:02 PM, Jordan Rose <jordan_rose at apple.com> wrote:

> std::list does support ripping out and inserting nodes in place (using the iterator versions of insert() and erase()), and using an ilist for a non-intrusive list seems weird.

Ah yes, so it does.  I had thought it did, looked at some documentation and didn't find it, and took this route.  I agree that replicating std::list's behavior doesn't make much sense if all we are doing is replicated std::list.

> I'm fairly sure flattening can still cause problems for when diagnostics are output twice, because PathDiagnosticPiece objects that contain path segments themselves really do need to be copied to make them independent. I don't think we really have a way to "share" the path pieces unless we have some kind of deepCloneNoLeaves() method.

I took a look at the flattening.  It really looks like we are either doing straight sharing or we conjure up new events.  The flattening essentially does a deep clone.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130429/4aea68bd/attachment.html>


More information about the cfe-commits mailing list