<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 - Assertion failure: matchesNodeFullFast doesn't match matchesNodeFullSlow"
href="https://bugs.llvm.org/show_bug.cgi?id=43639">43639</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assertion failure: matchesNodeFullFast doesn't match matchesNodeFullSlow
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>8.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</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>Tooling
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>kpreisert@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>The following code triggers the assertion "matchesNodeFullFast(Node) ==
matchesNodeFullSlow(Node)" in HasNameMatcher::matchesNode (part of the AST
matcher infrastructure) when matching the name "::hostent":
void func() {
struct hostent* s;
}
matchesNodeFullFast says that it's not a match, matchesNodeFullSlow says that
it's a match. The problem seems to be that forward declaring "hostent" inside a
function leads to some weird condition. I couldn't figure out any more details.
It doesn't happen if the struct is named differently, but I'm not sure what's
special about "hostent".
I was only able to test this with 8.0.0, maybe someone can confirm if this
still occurs in later versions.
Note that I previously reported a related bug where the same assertion fires:
<a class="bz_bug_link
bz_status_NEW "
title="NEW - hasName AST matcher is confused by extern "C" in namespace"
href="show_bug.cgi?id=42193">https://bugs.llvm.org/show_bug.cgi?id=42193</a></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>