Open cbourjau opened 8 years ago
Minimal reproduction:
class Base
{
public:
Base();
public:
int m_public;
protected:
int m_protected;
private:
int m_private;
};
class Derived : public Base
{
Derived()
{
this->| // only provides m_public, not m_protected
}
};
I can confirm your issue, if I comment the following check in Irony.cpp:
if (availability == CXAvailability_NotAccessible ||
availability == CXAvailability_NotAvailable) {
continue;
}
The bug seems to be in libclang, CXAvailability_NotAccessible
removes the protected members.
Howewer, removing this check also adds private members, not sure which is best.
Ideally we should confirm that the issue is in libclang and report a bug/provide a patch.
I look slightly more, this is a known bug: https://llvm.org/bugs/show_bug.cgi?id=24329
Many thanks for your effort! Unfortunately, it seems like that bug did not get a lot of traction since it was posted, but I fond some other reports as well. This one looked most promising: https://llvm.org/bugs/show_bug.cgi?id=20220
Hello, I am using irony and its company-irony completion every day and I love it. However, today I noticed an issue with protected members. Everything works fine in the class itself, but the protected members are not available for auto-completion in the deriving classes. Public members work fine and flycheck is not showing an error either. Am I missing something here or is this unexpected behaviour? My configuration is as below and I am on Ubuntu 14.04 with clang-3.5.
Thanks, Christian