[cfe-commits] [Patch 5 of 7] -verify fixes and enhancement
andyg1001 at hotmail.co.uk
Wed Jul 11 09:52:13 PDT 2012
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.
More information about the cfe-commits