mrdocs
mrdocs copied to clipboard
Many unhandled cases for friend declarations
Currently, friend declarations are correctly extracted in only the simplest of cases; any deviation results in asserts firing or incorrect extraction.
One way to fix friend declarations: add InfoKind::Friend, and generate the USR for the friend by concatenating the USR of its DeclContext with that of the befriended declaration. Friends could then be stored in RecordInfo::Members (preserving declaration order). This also lets us handle friend declarations which name a declaration for which there is no SymbolID (e.g. friend int; or friend T; where T is a template parameter). Such an implementation additionally allows for hidden friends to be handled correctly.