-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Open
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"diverges-from:edgDoes the clang frontend diverge from edg compiler on this issueDoes the clang frontend diverge from edg compiler on this issuediverges-from:msvcDoes the clang frontend diverge from msvc on this issueDoes the clang frontend diverge from msvc on this issue
Description
| Bugzilla Link | 19686 |
| Version | 3.4 |
| OS | MacOS X |
| Reporter | LLVM Bugzilla Contributor |
| CC | @DougGregor |
Extended Description
Steps to Reproduce:
Compile the following code:
class A {
protected:
void ProtectedMemberFunc() {}
};
class B : public A {
friend void A::ProtectedMemberFunc();
};Expected result:
The code compiles without error.
Actual result:
The following error is raised:
main.cpp:8:20: error: friend function 'ProtectedMemberFunc' is a protected member of 'A'
friend void A::ProtectedMemberFunc();
~~~^
main.cpp:8:20: note: must name member using the type of the current context 'B'
Additional Notes:
Exact version: Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Similar to bug http://llvm.org/bugs/show_bug.cgi?id=6840
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"diverges-from:edgDoes the clang frontend diverge from edg compiler on this issueDoes the clang frontend diverge from edg compiler on this issuediverges-from:msvcDoes the clang frontend diverge from msvc on this issueDoes the clang frontend diverge from msvc on this issue