http://llvm.org/bugs/show_bug.cgi?id=7209
Summary: Seek out invalid candidates that GCC would find when
overload resolution fails
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Keywords: quality-of-implementation
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
GCC compiles the following example because it performs non-ADL name lookup for
operator<< at instantiation time (which is wrong):
#include <iostream>
namespace N {
struct X { };
}
using namespace N;
template<typename T>
void log(const T& t) {
std::clog << t;
}
std::ostream &operator<<(std::ostream&, const X& x);
template void log(const X&);
This has led to some confusion, so we would like to improve the diagnostic. For
example, if overload resolution finds nothing or is ambiguous, we could
consider adding candidates that shouldn't be visible (but other compilers
sometimes see anyway), and, if those candidates are chosen, emit a specific
diagnostic about the reason they aren't actually visible.
--
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