[LLVMbugs] [Bug 19686] New: Protected friend function in parent class will not compile
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed May 7 18:23:24 PDT 2014
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: unassignedclangbugs at nondot.org
Reporter: bugzilla at wunderbear.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140508/87d6693f/attachment.html>
More information about the llvm-bugs
mailing list