The definition may be mangled while an undefined reference is not.
This may come up when the reference is from a C file or the definition
misses an extern "C".
Suggest an arbitrary <source-name> that matches the undefined reference,
if such a definition exists.
ld.lld: error: undefined symbol: foo >>> referenced by a.o:(.text+0x1) >>> did you mean to declare foo(int) as extern "C"? >>> defined in: a1.o
I'm not super comfortable with this hand-written demangling (maintenance burden/code duplication, etc) - is there something in the itanium demangling library that already does this/can be reused (or refactored so it can be reused)?