[PATCH] D30210: [include-fixer] Add usage count to find-all-symbols.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 22 02:28:54 PST 2017


sammccall planned changes to this revision.
sammccall added a comment.

OK, some changes to come here:

- klimek thinks using a set as a pseudo-map with `mutable` is evil, which is a fair point
- the current `SymbolReporter` interface doesn't provide enough information to deduplicate efficiently, so we'll move the dedup to `FindAllSymbols` instead.



================
Comment at: include-fixer/find-all-symbols/SymbolInfo.h:79-80
 
-  /// \brief The number of times this symbol was found during an indexing run.
-  unsigned getNumOccurrences() const { return NumOccurrences; }
+  // Ranking signals are mutable to allow updating when the SymbolInfo is a map
+  // key. They do not affect ordering or equality.
+  /// \brief The number of times this symbol was found during an indexing
----------------
klimek wrote:
> So we map from Symbol to NumOccurences in SymbolInfoMain, but duplicate the info in the key? That seems somewhat weird.
We no longer do that mapping.


https://reviews.llvm.org/D30210





More information about the cfe-commits mailing list