How are the tags for an overloaded function in DoCC/Markdown generated?

Reading the Swift-Algorithm package, I see documentation pointing to a function like this:


This function is overloaded, and the second one has a different tag at the end. I didn't see any tags during a quick look into the functions' doc comments. If there isn't a database file somewhere else in the project, how do docs know which tag corresponds to which overload?

I'm asking because I'm trying out writing an extension to the library that has overloaded functions, so I have to somehow create tags in the docs.


they are computed by hashing the symbol’s USR, which is obtained by inserting a colon after the first character of its mangled name.

So how does someone writing potential Swift code generate this themselves?

you would need to implement the FNV1 hash and the variant used by DocC, possibly using the code i linked as inspiration.