[cfe-dev] PR5478 Patch - unexpected function pointer in argument diagnostic improvement

Samuel Harrington samuel.harrington at mines.sdsmt.edu
Thu Mar 11 15:13:49 PST 2010


Hello,

I've been a long-time lurker, and decided I would try my hand at
working on a simple patch. Attached is a patch to improve the
diagnostic in C++ for the following case, from PR5478:

struct A;
A* inner(....);
void outer(A *);
void test() { outer(inner); }

The patch adds a note:

t.cpp(4) :  note: perhaps you meant to call this function with '()'?
void f2() { outer(inner); }
                  ^
                       ()

Any comments would be appreciated.

Thanks,
- Sam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: func_as_arg.patch
Type: application/octet-stream
Size: 2857 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100311/1ebf4d7f/attachment.obj>


More information about the cfe-dev mailing list