http://llvm.org/bugs/show_bug.cgi?id=19686
Bug ID: 19686
Summary: Protected friend function in parent class will not
compile
Product: clang
Version: 3.4
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
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
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs