http://llvm.org/bugs/show_bug.cgi?id=7288
Summary: Fixit for missing & before member-pointer expression
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Keywords: quality-of-implementation
Severity: enhancement
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected],
[email protected]
$ cat test.cc
struct Foo {
int square(int i);
};
void TakeMemberPointer(Foo&, int(Foo::*)(int));
void Use() {
Foo f;
TakeMemberPointer(f, Foo::square);
}
$ clang++ -fsyntax-only test.cc
test.cc:9:29: error: call to non-static member function without an object
argument
TakeMemberPointer(f, Foo::square);
~~~~~^~~~~~
1 error generated.
$
Instead of assuming that's going to be a call, clang should recognize that it's
intended to be a member-function-pointer expression and give a fixit to add the
'&'.
--
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