-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed as not planned
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second partyinvalidResolved as invalid, i.e. not a bugResolved as invalid, i.e. not a bugrejects-valid
Description
| Bugzilla Link | 35055 |
| Version | trunk |
| OS | All |
| Reporter | LLVM Bugzilla Contributor |
| CC | @DougGregor |
Extended Description
The following produces a ".... is a protected member of..." error while the friend declaration in the derived class is honored by gcc (multiple versions upto trunk), Visual Studio (multiple versions upto VS2017) and ICC.
Are they all wrongly accepting this code, or is this a Clang only issue ?
--8<--
class AFriend;
class Foo
{
protected:
static void Bar();
};
#if 1
class DerivedFoo
: public Foo
{
friend class AFriend;
};
#endif
class AFriend
{
public:
void CallFooBar()
{
Foo::Bar();
}
};
--8<--
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second partyinvalidResolved as invalid, i.e. not a bugResolved as invalid, i.e. not a bugrejects-valid