[llvm-bugs] [Bug 30554] New: "reference to non-static member function must be called" error given twice

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Sep 28 12:53:05 PDT 2016


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

            Bug ID: 30554
           Summary: "reference to non-static member function must be
                    called" error given twice
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: zilla at kayari.org
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

struct A {
  int foo();
};

A a;
auto x = a.foo;

prog.cc:6:12: error: reference to non-static member function must be called;
did you mean to call it with no arguments?
auto x = a.foo;
         ~~^~~
              ()
prog.cc:6:12: error: reference to non-static member function must be called;
did you mean to call it with no arguments?
auto x = a.foo;
         ~~^~~
              ()
2 errors generated.


If "int" is used instead of "auto" there is only one error.

-- 
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/20160928/cf640c0f/attachment.html>


More information about the llvm-bugs mailing list