[PATCH] D62970: [clang-doc] De-duplicate comments and locations

Jake Ehrlich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 24 11:17:18 PDT 2019


jakehehrlich added a comment.

LGTM



================
Comment at: clang-tools-extra/clang-doc/Representation.h:66
+
+  bool operator<(const CommentInfo &Other) const {
+    auto FirstCI = std::tie(Kind, Text, Name, Direction, ParamName, CloseName,
----------------
We should be explicit about what we intend to happen here. Do we just want a total ordering of any kind? Do we want some things to be "more important" than others? For instance because the ordering is lexicographical here Kind is more important than Text which is more important than Name etc...

If the intent is just to have any total order state so at the top and why we need a total ordering (for instance to have an std::set/std::map of these things or we need to sort them, etc...)


================
Comment at: clang-tools-extra/clang-doc/Representation.h:186
 
+  bool operator<(const Location &Other) const {
+    return std::tie(LineNumber, Filename) <
----------------
Same comment here.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62970/new/

https://reviews.llvm.org/D62970





More information about the cfe-commits mailing list