[cfe-dev] spurious unused function warning on static constructor/destructor

Jean-Daniel Dupas devlists at shadowlab.org
Fri Apr 9 03:20:25 PDT 2010


I don't think clang should emit an "unused function" warning when the function is declared as a constructor or a destructor (using Constructor/Destructor Attr).

Here is a patch that prevent warning and (used add two cases in the warn-unused-function.c test).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: unused.patch
Type: application/octet-stream
Size: 1128 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100409/b2db18f3/attachment.obj>
-------------- next part --------------



-- Jean-Daniel






More information about the cfe-dev mailing list