[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:09:36 PDT 2024
================
@@ -312,6 +317,16 @@ struct SymbolInfo : public Info {
std::optional<Location> DefLoc; // Location where this decl is defined.
llvm::SmallVector<Location, 2> Loc; // Locations where this decl is declared.
+
+ bool operator<(const SymbolInfo &Other) const {
+ if (DefLoc && Other.DefLoc) {
+ return *DefLoc < *Other.DefLoc;
----------------
PeterChou1 wrote:
I've updated the code so that if they are equal we just fallback to comparing names
https://github.com/llvm/llvm-project/pull/101387
More information about the cfe-commits
mailing list