[LLVMbugs] [Bug 18995] New: Strangely worded error message "reference to non-static member function must be called"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Feb 27 13:35:55 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=18995

            Bug ID: 18995
           Summary: Strangely worded error message "reference to
                    non-static member function must be called"
           Product: clang
           Version: 3.4
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: schnetter at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I received the following error message for C++ code:
{{{
      reference to non-static member function must be called
            static_cast<derived const *>(this)->eigenvalues<direction>(
}}}
The caret points to the "e" of "eigenvalues".

Although I am familiar with C++, I do not understand the wording of this error
message. I think the wording can be improved.

The immediate meaning seems to be that there is a non-static member function,
and that one must call it, implying that I am trying to do something else with
it. That is wrong; I am actually trying to call it.

I assume that this message wants to say "This looks like a function call for a
non-static member function, but this is not actually a non-static member
function." Additionally, it could tell me what "eigenvalues<direction>"
actually is.

In this case, the issue is that "eigenvalues" exists in both this class and its
superclass, and the C-style cast to the superclass is not accepted by Clang.
(Other compilers accepted it.)

Could you improve the wording of the error message?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140227/6b1f02d2/attachment.html>


More information about the llvm-bugs mailing list