On Jul 11, 2012, at 9:52 AM, Andy Gibbs wrote: > On Wednesday, July 11, 2012 5:39 PM, Jordan Rose wrote: >> Uh, hang on. Is there a reason to use std::set instead of >> SmallPtrSet<const FileEntry *> and DenseSet<FileID>? > > Well, there's a technical reason and a non-technical reason. The latter is > simply that when I started this patch, I didn't know of the existance of > DenseSet et al. Regarding the former, unless I'm mistaken, SmallPtrSet > doesn't have a "find" method which seems a little odd, but means a scan using > iterators. > > Anyway, by all means use DenseSet for both instead of std::set in the two > typedefs. No other changes seem necessary (as far as I see). Ultimately, it > will become academic since these lists are only maintained to handle the > post-processing check for missed diagnostics. When this is fixed correctly, > as I've discussed elsewhere, then these lists will hopefully become obsolete. > > Are you happy just to make the changes as you commit? The "#include <set>" > can also drop out. > > Cheers > Andy
SmallPtrSet doesn't have 'find' but it does have 'count', which returns a bool (by analogy with std::set's count, though that returns a 1 or 0 integer). I'll go ahead and make those changes and then commit! Jordan _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
