We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 978b531 commit a851305Copy full SHA for a851305
src/ir/item.rs
@@ -1194,7 +1194,18 @@ impl ClangItemParser for Item {
1194
// Types are sort of special, so to avoid parsing template classes
1195
// twice, handle them separately.
1196
{
1197
- let applicable_cursor = cursor.definition().unwrap_or(cursor);
+ let definition = cursor.definition();
1198
+ let applicable_cursor = definition.unwrap_or(cursor);
1199
+
1200
+ if definition.is_some() && definition != Some(cursor) {
1201
+ return Ok(Item::from_ty_or_ref(
1202
+ applicable_cursor.cur_type(),
1203
+ cursor,
1204
+ parent_id,
1205
+ ctx,
1206
+ ));
1207
+ }
1208
1209
match Item::from_ty(
1210
&applicable_cursor.cur_type(),
1211
applicable_cursor,
0 commit comments