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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to