"Wrong C++ default declaration in a method" build failure(s) — clang 5.0

The default argument must be set in the definition or the definition done in the method declaration.
class string
{
    friend string foo(int bar = 0);
};
PackageVersionSupposed error messageFull log Bug report
clamfs 1.0.1-3string.h:734:35: error: friend declaration specifying a default argument must be a definition Log
ddd 1:3.3.12-5.1strclass.h:813:19: error: friend declaration specifying a default argument must be a definition Log 755226
libabigail 1.0~rc6-2abg-comparison.h:2146:3: error: friend declaration specifying a default argument must be a definition Log
libccscript3 1.1.7-2string.h:734:35: error: friend declaration specifying a default argument must be a definition Log
libcommoncpp2 1.8.1-6.1../inc/cc++/string.h:734:35: error: friend declaration specifying a default argument must be a definition Log 756438
ui-utilcpp 1.8.5-1string.h:734:35: error: friend declaration specifying a default argument must be a definition Log
vfu 4.10-1.1./vstring.h:274:19: error: friend declaration specifying a default argument must be a definition Log 756330

7 errors