[PATCH] Sema: Fix spurious 'infinite recursion' warning for overloaded functions

Vedant Kumar vsk at apple.com
Wed Jul 29 16:41:48 PDT 2015


Sema::checkRecursiveFunction() currently cannot tell overloaded functions apart.

This results in spurious warnings -- clang claims that a function is infinitely recursive when it in fact just calls a different function. The attached patch fixes the problem by keeping the original FunctionDecl around, instead of switching to the 'canonical' decl.

I don't have commit rights, so I'd appreciate someone taking a look at the patch and guiding it into trunk :).

vedant

-------------- next part --------------
A non-text attachment was scrubbed...
Name: infinite-recursion-overload.patch
Type: application/octet-stream
Size: 1562 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150729/506887f3/attachment.obj>


More information about the cfe-commits mailing list