<html>
<head>
<base href="http://llvm.org/bugs/" />
</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 --- - Incomplete cursor traversal: FieldDecl init"
href="http://llvm.org/bugs/show_bug.cgi?id=22183">22183</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Incomplete cursor traversal: FieldDecl init
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>libclang
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>contact@jeaye.com
</td>
</tr>
<tr>
<th>CC</th>
<td>klimek@google.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Given the code (saved as foo.cpp):
struct foo
{
int num{ 42 };
int age{ num };
};
and my example test code: <a href="https://gist.github.com/jeaye/edd9b0f036f9bef91985">https://gist.github.com/jeaye/edd9b0f036f9bef91985</a>
the resulting output (of each cursor) is currently (trunk as of 01-10-15):
foo, 1:1 -> 5:2, StructDecl, Record, foo
num, 3:3 -> 3:16, FieldDecl, Int, num
age, 4:3 -> 4:17, FieldDecl, Int, age
This means that neither the integer literal (42) nor the member ref (num) is
traversed. After my commit:
<a href="https://github.com/jeaye/clang/commit/7fc5ad762dfc9c3da56c5a10c9c5990e4da4a254">https://github.com/jeaye/clang/commit/7fc5ad762dfc9c3da56c5a10c9c5990e4da4a254</a>
the resulting output of the same test program is:
foo, 1:1 -> 5:2, StructDecl, Record, foo
num, 3:3 -> 3:16, FieldDecl, Int, num
, 3:10 -> 3:16, InitListExpr, Int,
, 3:12 -> 3:14, IntegerLiteral, Int,
age, 4:3 -> 4:17, FieldDecl, Int, age
, 4:10 -> 4:17, InitListExpr, Int,
num, 4:12 -> 4:15, UnexposedExpr, Int, num
num, 4:12 -> 4:15, MemberRefExpr, Int, num</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>