• Home
  • Raw
  • Download

Lines Matching +full:x +full:- +full:access +full:- +full:token

29         // FIXME(emilio): clang-sys doesn't expose `CXCursor_WarnUnusedResultAttr` (from clang 9).
54 x: CXCursor, field
58 fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { in fmt()
75 pub fn usr(&self) -> Option<String> { in usr()
76 let s = unsafe { cxstring_into_string(clang_getCursorUSR(self.x)) }; in usr()
85 pub fn is_declaration(&self) -> bool { in is_declaration()
90 pub fn is_anonymous(&self) -> bool { in is_anonymous()
91 unsafe { clang_Cursor_isAnonymous(self.x) != 0 } in is_anonymous()
95 pub fn spelling(&self) -> String { in spelling()
96 unsafe { cxstring_into_string(clang_getCursorSpelling(self.x)) } in spelling()
103 pub fn display_name(&self) -> String { in display_name()
104 unsafe { cxstring_into_string(clang_getCursorDisplayName(self.x)) } in display_name()
108 pub fn mangling(&self) -> String { in mangling()
109 unsafe { cxstring_into_string(clang_Cursor_getMangling(self.x)) } in mangling()
114 pub fn cxx_manglings(&self) -> Result<Vec<String>, ()> { in cxx_manglings()
117 let manglings = clang_Cursor_getCXXManglings(self.x); in cxx_manglings()
133 /// Returns whether the cursor refers to a built-in definition.
134 pub fn is_builtin(&self) -> bool { in is_builtin()
146 /// of the out-of-line `method` definition, while the lexical parent is the
156 pub fn lexical_parent(&self) -> Cursor { in lexical_parent()
159 x: clang_getCursorLexicalParent(self.x), in lexical_parent()
168 pub fn fallible_semantic_parent(&self) -> Option<Cursor> { in fallible_semantic_parent()
171 x: clang_getCursorSemanticParent(self.x), in fallible_semantic_parent()
184 pub fn semantic_parent(&self) -> Cursor { in semantic_parent()
194 pub fn num_template_args(&self) -> Option<u32> { in num_template_args()
203 unsafe { clang_Cursor_getNumTemplateArguments(self.x) }; in num_template_args()
208 debug_assert_eq!(n, -1); in num_template_args()
228 pub fn translation_unit(&self) -> Cursor { in translation_unit()
231 let tu = clang_Cursor_getTranslationUnit(self.x); in translation_unit()
233 x: clang_getTranslationUnitCursor(tu), in translation_unit()
241 pub fn is_toplevel(&self) -> bool { in is_toplevel()
262 pub fn is_template_like(&self) -> bool { in is_template_like()
271 /// Is this Cursor pointing to a function-like macro definition?
272 pub fn is_macro_function_like(&self) -> bool { in is_macro_function_like()
273 unsafe { clang_Cursor_isMacroFunctionLike(self.x) != 0 } in is_macro_function_like()
277 pub fn kind(&self) -> CXCursorKind { in kind()
278 self.x.kind in kind()
282 pub fn is_definition(&self) -> bool { in is_definition()
283 unsafe { clang_isCursorDefinition(self.x) != 0 } in is_definition()
287 pub fn is_template_specialization(&self) -> bool { in is_template_specialization()
293 pub fn is_fully_specialized_template(&self) -> bool { in is_fully_specialized_template()
301 pub fn is_in_non_fully_specialized_template(&self) -> bool { in is_in_non_fully_specialized_template()
319 pub fn is_template_parameter(&self) -> bool { in is_template_parameter()
329 pub fn is_dependent_on_template_parameter(&self) -> bool { in is_dependent_on_template_parameter()
333 ) -> CXChildVisitResult { in is_dependent_on_template_parameter()
369 pub fn is_valid(&self) -> bool { in is_valid()
374 pub fn location(&self) -> SourceLocation { in location()
377 x: clang_getCursorLocation(self.x), in location()
383 pub fn extent(&self) -> CXSourceRange { in extent()
384 unsafe { clang_getCursorExtent(self.x) } in extent()
388 pub fn raw_comment(&self) -> Option<String> { in raw_comment()
390 cxstring_into_string(clang_Cursor_getRawCommentText(self.x)) in raw_comment()
400 pub fn comment(&self) -> Comment { in comment()
403 x: clang_Cursor_getParsedComment(self.x), in comment()
409 pub fn cur_type(&self) -> Type { in cur_type()
412 x: clang_getCursorType(self.x), in cur_type()
420 pub fn definition(&self) -> Option<Cursor> { in definition()
423 x: clang_getCursorDefinition(self.x), in definition()
436 pub fn referenced(&self) -> Option<Cursor> { in referenced()
439 x: clang_getCursorReferenced(self.x), in referenced()
455 pub fn canonical(&self) -> Cursor { in canonical()
458 x: clang_getCanonicalCursor(self.x), in canonical()
466 pub fn specialized(&self) -> Option<Cursor> { in specialized()
469 x: clang_getSpecializedCursorTemplate(self.x), in specialized()
481 pub fn template_kind(&self) -> CXCursorKind { in template_kind()
482 unsafe { clang_getTemplateCursorKind(self.x) } in template_kind()
490 Visitor: FnMut(Cursor) -> CXChildVisitResult, in visit()
494 clang_visitChildren(self.x, visit_children::<Visitor>, data.cast()); in visit()
499 pub fn collect_children(&self) -> Vec<Cursor> { in collect_children()
509 pub fn has_children(&self) -> bool { in has_children()
519 pub fn has_at_least_num_children(&self, n: usize) -> bool { in has_at_least_num_children()
523 num_left -= 1; in has_at_least_num_children()
536 pub fn contains_cursor(&self, kind: CXCursorKind) -> bool { in contains_cursor()
552 pub fn is_inlined_function(&self) -> bool { in is_inlined_function()
553 unsafe { clang_Cursor_isFunctionInlined(self.x) != 0 } in is_inlined_function()
557 pub fn is_defaulted_function(&self) -> bool { in is_defaulted_function()
558 unsafe { clang_CXXMethod_isDefaulted(self.x) != 0 } in is_defaulted_function()
562 pub fn is_deleted_function(&self) -> bool { in is_deleted_function()
578 pub fn is_bit_field(&self) -> bool { in is_bit_field()
579 unsafe { clang_Cursor_isBitField(self.x) != 0 } in is_bit_field()
584 pub fn bit_width_expr(&self) -> Option<Cursor> { in bit_width_expr()
608 pub fn bit_width(&self) -> Option<u32> { in bit_width()
611 // https://github.com/rust-lang/rust-bindgen/issues/2239 in bit_width()
617 let w = clang_getFieldDeclBitWidth(self.x); in bit_width()
618 if w == -1 { in bit_width()
628 pub fn enum_type(&self) -> Option<Type> { in enum_type()
631 x: clang_getEnumDeclIntegerType(self.x), in enum_type()
644 pub fn enum_val_boolean(&self) -> Option<bool> { in enum_val_boolean()
647 Some(clang_getEnumConstantDeclValue(self.x) != 0) in enum_val_boolean()
657 pub fn enum_val_signed(&self) -> Option<i64> { in enum_val_signed()
661 Some(clang_getEnumConstantDeclValue(self.x) as i64) in enum_val_signed()
671 pub fn enum_val_unsigned(&self) -> Option<u64> { in enum_val_unsigned()
675 Some(clang_getEnumConstantDeclUnsignedValue(self.x) as u64) in enum_val_unsigned()
686 ) -> [bool; N] {
721 pub fn typedef_type(&self) -> Option<Type> { in typedef_type()
723 x: unsafe { clang_getTypedefDeclUnderlyingType(self.x) }, in typedef_type()
736 pub fn linkage(&self) -> CXLinkageKind { in linkage()
737 unsafe { clang_getCursorLinkage(self.x) } in linkage()
741 pub fn visibility(&self) -> CXVisibilityKind { in visibility()
742 unsafe { clang_getCursorVisibility(self.x) } in visibility()
750 pub fn args(&self) -> Option<Vec<Cursor>> { in args()
757 x: unsafe { clang_Cursor_getArgument(self.x, i as c_uint) }, in args()
768 pub fn num_args(&self) -> Result<u32, ()> { in num_args()
770 let w = clang_Cursor_getNumArguments(self.x); in num_args()
771 if w == -1 { in num_args()
779 /// Get the access specifier for this cursor's referent.
780 pub fn access_specifier(&self) -> CX_CXXAccessSpecifier { in access_specifier()
781 unsafe { clang_getCXXAccessSpecifier(self.x) } in access_specifier()
788 pub fn public_accessible(&self) -> bool { in public_accessible()
789 let access = self.access_specifier(); in public_accessible() localVariable
790 access == CX_CXXPublic || access == CX_CXXInvalidAccessSpecifier in public_accessible()
795 pub fn is_mutable_field(&self) -> bool { in is_mutable_field()
796 unsafe { clang_CXXField_isMutable(self.x) != 0 } in is_mutable_field()
800 pub fn offset_of_field(&self) -> Result<usize, LayoutError> { in offset_of_field()
801 let offset = unsafe { clang_Cursor_getOffsetOfField(self.x) }; in offset_of_field()
811 pub fn method_is_static(&self) -> bool { in method_is_static()
812 unsafe { clang_CXXMethod_isStatic(self.x) != 0 } in method_is_static()
816 pub fn method_is_const(&self) -> bool { in method_is_const()
817 unsafe { clang_CXXMethod_isConst(self.x) != 0 } in method_is_const()
821 pub fn method_is_virtual(&self) -> bool { in method_is_virtual()
822 unsafe { clang_CXXMethod_isVirtual(self.x) != 0 } in method_is_virtual()
826 pub fn method_is_pure_virtual(&self) -> bool { in method_is_pure_virtual()
827 unsafe { clang_CXXMethod_isPureVirtual(self.x) != 0 } in method_is_pure_virtual()
831 pub fn is_virtual_base(&self) -> bool { in is_virtual_base()
832 unsafe { clang_isVirtualBase(self.x) != 0 } in is_virtual_base()
836 pub fn evaluate(&self) -> Option<EvalResult> { in evaluate()
841 pub fn ret_type(&self) -> Option<Type> { in ret_type()
843 x: unsafe { clang_getCursorResultType(self.x) }, in ret_type()
853 pub fn tokens(&self) -> RawTokens { in tokens()
858 pub fn cexpr_tokens(self) -> Vec<cexpr::token::Token> { in cexpr_tokens() argument
861 .filter_map(|token| token.as_cexpr_token()) in cexpr_tokens()
868 pub fn get_included_file_name(&self) -> Option<String> { in get_included_file_name()
869 let file = unsafe { clang_sys::clang_getIncludedFile(self.x) }; in get_included_file_name()
889 fn new(cursor: &'a Cursor) -> Self { in new()
893 let tu = unsafe { clang_Cursor_getTranslationUnit(cursor.x) }; in new()
903 fn as_slice(&self) -> &[CXToken] { in as_slice()
911 pub fn iter(&self) -> ClangTokenIterator { in iter()
933 /// A raw clang token, that exposes only kind, spelling, and extent. This is a
939 /// The extent of the token. This is the same as the relevant member from
942 /// The kind of the token. This is the same as the relevant member from
948 /// Get the token spelling, without being converted to utf-8.
949 pub fn spelling(&self) -> &[u8] { in spelling()
956 /// Converts a ClangToken to a `cexpr` token if possible.
957 pub fn as_cexpr_token(&self) -> Option<cexpr::token::Token> { in as_cexpr_token() argument
958 use cexpr::token; in as_cexpr_token()
961 CXToken_Punctuation => token::Kind::Punctuation, in as_cexpr_token()
962 CXToken_Literal => token::Kind::Literal, in as_cexpr_token()
963 CXToken_Identifier => token::Kind::Identifier, in as_cexpr_token()
964 CXToken_Keyword => token::Kind::Keyword, in as_cexpr_token()
969 warn!("Found unexpected token kind: {:?}", self); in as_cexpr_token()
974 Some(token::Token { in as_cexpr_token()
996 fn next(&mut self) -> Option<Self::Item> { in next()
1013 pub fn is_valid_identifier(name: &str) -> bool { in is_valid_identifier()
1027 ) -> CXChildVisitResult in visit_children()
1029 Visitor: FnMut(Cursor) -> CXChildVisitResult, in visit_children()
1032 let child = Cursor { x: cur }; in visit_children()
1038 fn eq(&self, other: &Cursor) -> bool { in eq()
1039 unsafe { clang_equalCursors(self.x, other.x) == 1 } in eq()
1047 unsafe { clang_hashCursor(self.x) }.hash(state) in hash()
1054 x: CXType, field
1058 fn eq(&self, other: &Self) -> bool { in eq()
1059 unsafe { clang_equalTypes(self.x, other.x) != 0 } in eq()
1066 fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { in fmt()
1098 fn from(val: i32) -> Self { in from()
1114 pub fn kind(&self) -> CXTypeKind { in kind()
1115 self.x.kind in kind()
1119 pub fn declaration(&self) -> Cursor { in declaration()
1122 x: clang_getTypeDeclaration(self.x), in declaration()
1131 ) -> Option<CanonicalTypeDeclaration> { in canonical_declaration()
1154 pub fn spelling(&self) -> String { in spelling()
1155 let s = unsafe { cxstring_into_string(clang_getTypeSpelling(self.x)) }; in spelling()
1168 pub fn is_const(&self) -> bool { in is_const()
1169 unsafe { clang_isConstQualifiedType(self.x) != 0 } in is_const()
1173 fn is_non_deductible_auto_type(&self) -> bool { in is_non_deductible_auto_type()
1179 fn clang_size_of(&self, ctx: &BindgenContext) -> c_longlong { in clang_size_of()
1181 // Work-around https://bugs.llvm.org/show_bug.cgi?id=40975 in clang_size_of()
1185 // Work-around https://bugs.llvm.org/show_bug.cgi?id=40813 in clang_size_of()
1186 CXType_Auto if self.is_non_deductible_auto_type() => -6, in clang_size_of()
1187 _ => unsafe { clang_Type_getSizeOf(self.x) }, in clang_size_of()
1192 fn clang_align_of(&self, ctx: &BindgenContext) -> c_longlong { in clang_align_of()
1194 // Work-around https://bugs.llvm.org/show_bug.cgi?id=40975 in clang_align_of()
1198 // Work-around https://bugs.llvm.org/show_bug.cgi?id=40813 in clang_align_of()
1199 CXType_Auto if self.is_non_deductible_auto_type() => -6, in clang_align_of()
1200 _ => unsafe { clang_Type_getAlignOf(self.x) }, in clang_align_of()
1206 pub fn size(&self, ctx: &BindgenContext) -> usize { in size()
1219 ) -> Result<usize, LayoutError> { in fallible_size()
1230 pub fn align(&self, ctx: &BindgenContext) -> usize { in align()
1243 ) -> Result<usize, LayoutError> { in fallible_align()
1257 ) -> Result<crate::ir::layout::Layout, LayoutError> { in fallible_layout()
1266 pub fn num_template_args(&self) -> Option<u32> { in num_template_args()
1267 let n = unsafe { clang_Type_getNumTemplateArguments(self.x) }; in num_template_args()
1271 debug_assert_eq!(n, -1); in num_template_args()
1278 pub fn template_args(&self) -> Option<TypeTemplateArgIterator> { in template_args()
1280 x: self.x, in template_args()
1289 pub fn args(&self) -> Option<Vec<Type>> { in args()
1293 x: unsafe { clang_getArgType(self.x, i as c_uint) }, in args()
1302 pub fn num_args(&self) -> Result<u32, ()> { in num_args()
1304 let w = clang_getNumArgTypes(self.x); in num_args()
1305 if w == -1 { in num_args()
1315 pub fn pointee_type(&self) -> Option<Type> { in pointee_type()
1324 x: unsafe { clang_getPointeeType(self.x) }, in pointee_type()
1335 pub fn elem_type(&self) -> Option<Type> { in elem_type()
1337 x: unsafe { clang_getElementType(self.x) }, in elem_type()
1348 pub fn num_elements(&self) -> Option<usize> { in num_elements()
1349 let num_elements_returned = unsafe { clang_getNumElements(self.x) }; in num_elements()
1350 if num_elements_returned != -1 { in num_elements()
1359 pub fn canonical_type(&self) -> Type { in canonical_type()
1362 x: clang_getCanonicalType(self.x), in canonical_type()
1368 pub fn is_variadic(&self) -> bool { in is_variadic()
1369 unsafe { clang_isFunctionTypeVariadic(self.x) != 0 } in is_variadic()
1374 pub fn ret_type(&self) -> Option<Type> { in ret_type()
1376 x: unsafe { clang_getResultType(self.x) }, in ret_type()
1387 pub fn call_conv(&self) -> CXCallingConv { in call_conv()
1388 unsafe { clang_getFunctionTypeCallingConv(self.x) } in call_conv()
1393 pub fn named(&self) -> Type { in named()
1396 x: clang_Type_getNamedType(self.x), in named()
1402 pub fn is_valid(&self) -> bool { in is_valid()
1407 pub fn is_valid_and_exposed(&self) -> bool { in is_valid_and_exposed()
1412 pub fn is_fully_instantiated_template(&self) -> bool { in is_fully_instantiated_template()
1413 // Yep, the spelling of this containing type-parameter is extremely in is_fully_instantiated_template()
1434 pub fn is_associated_type(&self) -> bool { in is_associated_type()
1436 fn hacky_parse_associated_type<S: AsRef<str>>(spelling: S) -> bool { in is_associated_type()
1439 r"typename type\-parameter\-\d+\-\d+::.+" in is_associated_type()
1454 /// The `CanonicalTypeDeclaration` type exists as proof-by-construction that its
1464 pub fn ty(&self) -> &Type { in ty()
1469 pub fn cursor(&self) -> &Cursor { in cursor()
1476 x: CXType, field
1483 fn next(&mut self) -> Option<Type> { in next()
1488 x: unsafe { clang_Type_getTemplateArgumentAsType(self.x, idx) }, in next()
1497 fn len(&self) -> usize { in len()
1499 (self.length - self.index) as usize in len()
1506 x: CXSourceLocation, field
1512 pub fn location(&self) -> (File, usize, usize, usize) { in location()
1519 self.x, &mut file, &mut line, &mut col, &mut off, in location()
1521 (File { x: file }, line as usize, col as usize, off as usize) in location()
1527 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { in fmt()
1538 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { in fmt()
1547 x: CXComment, field
1552 pub fn kind(&self) -> CXCommentKind { in kind()
1553 unsafe { clang_Comment_getKind(self.x) } in kind()
1557 pub fn get_children(&self) -> CommentChildrenIterator { in get_children()
1559 parent: self.x, in get_children()
1560 length: unsafe { clang_Comment_getNumChildren(self.x) }, in get_children()
1567 pub fn get_tag_name(&self) -> String { in get_tag_name()
1568 unsafe { cxstring_into_string(clang_HTMLTagComment_getTagName(self.x)) } in get_tag_name()
1572 pub fn get_tag_attrs(&self) -> CommentAttributesIterator { in get_tag_attrs()
1574 x: self.x, in get_tag_attrs()
1575 length: unsafe { clang_HTMLStartTag_getNumAttrs(self.x) }, in get_tag_attrs()
1590 fn next(&mut self) -> Option<Comment> { in next()
1595 x: unsafe { clang_Comment_getChild(self.parent, idx) }, in next()
1613 x: CXComment, field
1620 fn next(&mut self) -> Option<CommentAttribute> { in next()
1627 self.x, idx, in next()
1632 self.x, idx, in next()
1644 x: CXFile, field
1649 pub fn name(&self) -> Option<String> { in name()
1650 if self.x.is_null() { in name()
1653 Some(unsafe { cxstring_into_string(clang_getFileName(self.x)) }) in name()
1657 fn cxstring_to_string_leaky(s: CXString) -> String { in cxstring_to_string_leaky()
1665 fn cxstring_into_string(s: CXString) -> String { in cxstring_into_string()
1674 x: CXIndex, field
1680 /// The `pch` parameter controls whether declarations in pre-compiled
1684 pub fn new(pch: bool, diag: bool) -> Index { in new()
1687 x: clang_createIndex(pch as c_int, diag as c_int), in new()
1694 fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { in fmt()
1702 clang_disposeIndex(self.x); in drop()
1709 x: CXTranslationUnit, field
1713 fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { in fmt()
1726 ) -> Option<TranslationUnit> { in parse()
1735 unsaved.iter().map(|f| f.x).collect(); in parse()
1738 ix.x, in parse()
1750 Some(TranslationUnit { x: tu }) in parse()
1756 pub fn diags(&self) -> Vec<Diagnostic> { in diags()
1758 let num = clang_getNumDiagnostics(self.x) as usize; in diags()
1762 x: clang_getDiagnostic(self.x, i as c_uint), in diags()
1770 pub fn cursor(&self) -> Cursor { in cursor()
1773 x: clang_getTranslationUnitCursor(self.x), in cursor()
1779 pub fn is_null(&self) -> bool { in is_null()
1780 self.x.is_null() in is_null()
1787 clang_disposeTranslationUnit(self.x); in drop()
1794 x: CXDiagnostic, field
1800 pub fn format(&self) -> String { in format()
1803 cxstring_into_string(clang_formatDiagnostic(self.x, opts)) in format()
1808 pub fn severity(&self) -> CXDiagnosticSeverity { in severity()
1809 unsafe { clang_getDiagnosticSeverity(self.x) } in severity()
1817 clang_disposeDiagnostic(self.x); in drop()
1824 x: CXUnsavedFile, field
1833 pub fn new(name: String, contents: String) -> UnsavedFile { in new()
1836 let x = CXUnsavedFile { in new() localVariable
1841 UnsavedFile { x, name, contents } in new()
1846 fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { in fmt()
1856 pub fn kind_to_str(x: CXCursorKind) -> String { in kind_to_str()
1857 unsafe { cxstring_into_string(clang_getCursorKindSpelling(x)) } in kind_to_str()
1861 pub fn type_to_str(x: CXTypeKind) -> String { in type_to_str()
1862 unsafe { cxstring_into_string(clang_getTypeKindSpelling(x)) } in type_to_str()
1866 pub fn ast_dump(c: &Cursor, depth: isize) -> CXChildVisitResult { in ast_dump()
1887 format!(" {}is-definition? {}", prefix, c.is_definition()), in ast_dump()
1891 format!(" {}is-declaration? {}", prefix, c.is_declaration()), in ast_dump()
1896 " {}is-inlined-function? {}", in ast_dump()
1907 " {}template-kind = {}", in ast_dump()
1917 print_indent(depth, format!(" {}number-of-args = {}", prefix, num)); in ast_dump()
1922 format!(" {}number-of-template-args = {}", prefix, num), in ast_dump()
1931 print_indent(depth, format!(" {}bit-width = {}", prefix, width)); in ast_dump()
1937 format!(" {}enum-type = {}", prefix, type_to_str(ty.kind())), in ast_dump()
1941 print_indent(depth, format!(" {}enum-val = {}", prefix, val)); in ast_dump()
1946 format!(" {}typedef-type = {}", prefix, type_to_str(ty.kind())), in ast_dump()
1952 format!(" {}ret-type = {}", prefix, type_to_str(ty.kind())), in ast_dump()
1992 String::from(prefix) + "semantic-parent.", in ast_dump()
2014 unsafe { clang_Type_getNumTemplateArguments(ty.x) }; in ast_dump()
2019 " {}number-of-template-args = {}", in ast_dump()
2027 format!(" {}number-of-elements = {}", prefix, num), in ast_dump()
2032 format!(" {}is-variadic? {}", prefix, ty.is_variadic()), in ast_dump()
2098 pub fn extract_clang_version() -> String { in extract_clang_version()
2105 x: CXEvalResult, field
2110 pub fn new(cursor: Cursor) -> Option<Self> { in new()
2112 // * https://github.com/rust-lang/rust-bindgen/issues/283 in new()
2113 // * https://github.com/rust-lang/rust-bindgen/issues/1590 in new()
2132 x: unsafe { clang_Cursor_Evaluate(cursor.x) }, in new()
2136 fn kind(&self) -> CXEvalResultKind { in kind()
2137 unsafe { clang_EvalResult_getKind(self.x) } in kind()
2141 pub fn as_double(&self) -> Option<f64> { in as_double()
2144 Some(unsafe { clang_EvalResult_getAsDouble(self.x) }) in as_double()
2151 pub fn as_int(&self) -> Option<i64> { in as_int()
2156 if unsafe { clang_EvalResult_isUnsignedInt(self.x) } != 0 { in as_int()
2157 let value = unsafe { clang_EvalResult_getAsUnsigned(self.x) }; in as_int()
2165 let value = unsafe { clang_EvalResult_getAsLongLong(self.x) }; in as_int()
2177 /// valid utf-8.
2178 pub fn as_literal_string(&self) -> Option<Vec<u8>> { in as_literal_string()
2182 CStr::from_ptr(clang_EvalResult_getAsStr(self.x)) in as_literal_string()
2193 unsafe { clang_EvalResult_dispose(self.x) }; in drop()
2208 pub fn new(tu: &TranslationUnit) -> Self { in new()
2212 let ti = clang_getTranslationUnitTargetInfo(tu.x); in new()