Type: LanguageService
No error emitted about inaccessible base class member in inline friend function of derived class.
Describe the bug
To Reproduce
.cpp file which contains the following codes:class Base {
protected:
int prot_mem;
};
class Sneaky : public Base {
inline friend void clobber(Sneaky &s) { s.j = s.prot_mem = 0; }
inline friend void clobber(Base &b) { b.prot_mem = 0; }
int j;
};
Expected behavior
Identify b.prot_mem as error just as if the error appears in a out-of-class friend function definition:
int Base::prot_mem
protected member "Base::prot_mem" (declared at line 3) is not accessible through a "Base" pointer or object
Screenshots


Hi @escape0707 . This also repro's in Visual Studio. (The C/C++ Extension shares common code for IntelliSense with VS). I've opened an issue against VS here.
Fixed in our latest Insiders release: https://github.com/microsoft/vscode-cpptools/releases/tag/0.27.0-insiders.
Fixed in our latest Insiders release: https://github.com/microsoft/vscode-cpptools/releases/tag/0.27.0-insiders.
Thanks for your hardwork on this. But I'm sorry that I can't test it in C++ project for now. Feel free to close this issue if it's confirmed fixed XD!
Most helpful comment
Fixed in our latest Insiders release: https://github.com/microsoft/vscode-cpptools/releases/tag/0.27.0-insiders.