http://llvm.org/bugs/show_bug.cgi?id=8705
Summary: clang doesn't handle friend member functions correctly
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
gcc 4.2 accepts the following program:
class B {
public:
void b(int a);
void c(int a);
};
class A {
private:
static int a();
friend void B::c(int);
};
//void B::b(int a = A::a()) {} // Should error
void B::c(int a = A::a()) {}
clang rejects it with
test.cc:14:22: error: 'a' is a private member of 'A'
void B::c(int a = A::a()) {}
^
test.cc:9:14: note: declared private here
static int a();
^
1 error generated.
(Reverting r120299 does not make this go away.)
--
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