Patch https://reviews.llvm.org/D124613 introduced an ADL leakage of friend functions when in MSVC compatibility mode. It broke some C++ compliant code. That patch fixes the problem introduced.
The original fix flagged friend function declarations as declarations, to follow MSVC behavior. The problem it introduced is that this same flag is used to do ADL and that made friend functions visible at the namespace level instead of them being visible at the class level only.