[LLVMbugs] [Bug 7681] New: confusing error with incomplete type
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Jul 21 00:10:40 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7681
Summary: confusing error with incomplete type
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: clattner at apple.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
Missing a #include caused clang to generate a super confusing error:
$ cat t.cc
template <typename PT1, typename PT2>
class PointerUnion;
void foo(PointerUnion<int*, float*> &Result) {
int *P = 0;
Result = P;
}
$ clang t.cc
t.cc:7:10: error: no viable overloaded '='
Result = P;
~~~~~~ ^ ~
1 error generated.
It should tell me that result is incomplete.
--
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