[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 1 14:34:09 PDT 2024
================
@@ -205,6 +205,22 @@ llvm::Error getHtmlAssetFiles(const char *Argv0,
return getDefaultAssetFiles(Argv0, CDCtx);
}
+/// Make the output of clang-doc deterministic by sorting the children of
+/// namespaces and records.
+void sortUsrToInfo(llvm::StringMap<std::unique_ptr<doc::Info>> &USRToInfo) {
+ for (auto &I : USRToInfo) {
----------------
PeterChou1 wrote:
How so? StringMap iteration order is not guaranteed to be deterministic and I don't think it was affecting the test before
https://github.com/llvm/llvm-project/pull/101387
More information about the cfe-commits
mailing list