http://llvm.org/bugs/show_bug.cgi?id=15841
Bug ID: 15841
Summary: linkage check for friend function
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
R171139 checks linkage compatibility. However, the friend function may need to
check lexical parent's linkage declaration.
For example:
extern "C" {
class Foo {
int val;
friend int bar(Foo &);
};
}
extern "C" int bar(Foo &f) {
return f.val;
}
Clang complains
error: declaration of 'bar' has a different language linkage
extern "C" int bar(Foo &f) {
^
--
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