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

Manuel Klimek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 22 01:48:31 PST 2017


klimek added inline comments.


================
Comment at: include-fixer/find-all-symbols/FindAllSymbols.cpp:251
+  } else {
+    assert(false && "Must match a NamedDecl!");
+  }
----------------
You can use llvm_unreachable  instead. Or do you actually want to fall through in release mode?


================
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
----------------
So we map from Symbol to NumOccurences in SymbolInfoMain, but duplicate the info in the key? That seems somewhat weird.


https://reviews.llvm.org/D30210





More information about the cfe-commits mailing list