In MSVC compatibility mode, friend function declarations behave as function declarations
Before C++20, MSVC treated any friend function declaration as a function declaration, so the following code would compile despite funGlob being declared after its first call: ``` class Glob { public: friend void funGlob(); void test() { funGlob(); } }; void funGlob() {} ``` This proposed patch mimics the MSVC behavior when in MSVC compatibility mode Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D124613
Loading
Please sign in to comment