jakehehrlich added a comment. I think everything but the implementation of `genIndex` being confusing looks good to me. I haven't actually groked how that code works yet other than the fact that it generates the index tree that I expect and all the surrounding code looks good to me. I understand that some of the trickiness here comes from the fact that you're building from a list of values but trying to generate the tree structure from that list which is hard. I think we can structure that code better; lets see if we can't device a better algorithm.
================ Comment at: clang-tools-extra/clang-doc/Generators.cpp:16 +Index Generator::genIndex(const std::vector<std::unique_ptr<Info>> &Infos) { + Index Idx; ---------------- Please document this function with more internal comments. I have no idea what's going on here and the shifting of 'I' is super confusing to me. ================ Comment at: clang-tools-extra/clang-doc/Generators.cpp:20 + Index *I = &Idx; + for (auto R = Info->Namespace.rbegin(), E = Info->Namespace.rend(); R != E; + ++R) { ---------------- Use llvm::reverse https://llvm.org/doxygen/STLExtras_8h.html CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65003/new/ https://reviews.llvm.org/D65003 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits