<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Bogus warning: all paths through this function will call itself"
href="https://bugs.llvm.org/show_bug.cgi?id=41556">41556</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Bogus warning: all paths through this function will call itself
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>6.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>FreeBSD
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>yuri@tsoft.com
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=21807" name="attach_21807" title="infinite-recursion-testcase.cpp">attachment 21807</a> <a href="attachment.cgi?id=21807&action=edit" title="infinite-recursion-testcase.cpp">[details]</a></span>
infinite-recursion-testcase.cpp
It prints this bogus warning:
<span class="quote">> $ c++ -Wall -o infinite-recursion-testcase infinite-recursion-testcase.cpp
> infinite-recursion-testcase.cpp:9:87: warning: all paths through this function will call itself [-Winfinite-recursion]
> friend std::ostream& operator<<(std::ostream &os, const AtomSignature &signature) {
> ^
> 1 warning generated.</span >
The warning is bogus because it calls itself with a different object. There is
no problem with infinite recursion there.
As long as there is variability in any of the arguments - there is no problem
with infinite recursion.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>