Skip to content

Commit 4d45f83

Browse files
committed
Add clang::Type::is_valid
A helper for checking if the type's kind is not `CXType_Invalid`.
1 parent cc82b83 commit 4d45f83

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/clang.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,11 @@ impl Type {
715715
}
716716
}
717717
}
718+
719+
/// Is this a valid type?
720+
pub fn is_valid(&self) -> bool {
721+
self.kind() != CXType_Invalid
722+
}
718723
}
719724

720725
/// An iterator for a type's template arguments.

0 commit comments

Comments
 (0)