[LLVMbugs] [Bug 10666] New: definition not emitted for friend operator overload inside instantiated template class
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Aug 15 16:35:52 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10666
Summary: definition not emitted for friend operator overload
inside instantiated template class
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: nlewycky at google.com
CC: llvmbugs at cs.uiuc.edu
This testcase involves templates, friends and operator overloading:
struct Empty {};
template<typename T> struct Helper {
void Method(const Helper<T> &bbox1) {
Helper<double> d;
}
friend void operator<<(Empty &, const Helper<T> &) {}
};
void test(Helper<double> helper) {
Empty os;
os << helper;
}
Clang does not emit the definition of operator<< (_ZlsR5EmptyRK6HelperIdE to be
specific) even though it emits a call to it.
--
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.
More information about the llvm-bugs
mailing list