https://llvm.org/bugs/show_bug.cgi?id=25738

            Bug ID: 25738
           Summary: Misleading error message when using a member operator
                    with an incomplete type
           Product: clang
           Version: 3.7
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Created attachment 15396
  --> https://llvm.org/bugs/attachment.cgi?id=15396&action=edit
Minimal example

Hello,

I found this (annoyingly) misleading error message.
When you use an operator of a type that is incomplete the error will not inform
you that the type is missing but that there is no such operator.

I would suggest that if an operator can not be found an additional check should
be made, that checks if all types that the operator is using are complete. If
one type is incomplete that should be the error message instead of the 'no
viable overloaded operator' one - or an additional note.

Attached you'll find a minimal example.


System: Linux 3.19.0-37-generic #42~14.04.1-Ubuntu SMP Mon Nov 23 15:13:51 UTC
2015 x86_64
Clang version: Ubuntu clang version 3.7.1-svn253742-1~exp1

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to