[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

Paul Kirth via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 1 14:08:52 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) {
----------------
ilovepi wrote:

That doesn't necessarily rule out its own iteration order affecting the output.

https://github.com/llvm/llvm-project/pull/101387


More information about the cfe-commits mailing list