http://llvm.org/bugs/show_bug.cgi?id=12328
Bug #: 12328
Summary: Friend method declaration doesn't require method to be
visible
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
This code:
class X {
void f();
};
class Y {
friend void X::f();
};
compiles on Clang (151385), but doesn't on GCC or Visual Studio (because X::f
is not visible to Y). Also, C++98 [class.friend]p7 says: "A name nominated by a
friend declaration shall be accessible in the scope of the class containing the
friend declaration."
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- 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