We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 390faaf commit 9b18a53Copy full SHA for 9b18a53
bindgen/clang.rs
@@ -2125,11 +2125,7 @@ impl EvalResult {
2125
2126
if unsafe { clang_EvalResult_isUnsignedInt(self.x) } != 0 {
2127
let value = unsafe { clang_EvalResult_getAsUnsigned(self.x) };
2128
- if value as u128 > i128::MAX as u128 {
2129
- return None;
2130
- }
2131
-
2132
- return Some(value as i128);
+ return i128::try_from(value).ok()
2133
}
2134
2135
let value = unsafe { clang_EvalResult_getAsLongLong(self.x) };
0 commit comments