diff options
Diffstat (limited to 'src/clang.rs')
-rw-r--r-- | src/clang.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/clang.rs b/src/clang.rs index 6233adea..0143c4db 100644 --- a/src/clang.rs +++ b/src/clang.rs @@ -455,6 +455,13 @@ impl Type { clang_getFunctionTypeCallingConv(self.x) } } + + #[cfg(not(feature="llvm_stable"))] + pub fn named(&self) -> Type { + unsafe { + Type { x: clang_Type_getNamedType(self.x) } + } + } } // SourceLocation @@ -955,6 +962,11 @@ pub fn type_to_str(x: Enum_CXTypeKind) -> &'static str { CXType_IncompleteArray => "IncompleteArray", CXType_VariableArray => "VariableArray", CXType_DependentSizedArray => "DependentSizedArray", + CXType_MemberPointer => "MemberPointer", + #[cfg(not(feature="llvm_stable"))] + CXType_Auto => "Auto", + #[cfg(not(feature="llvm_stable"))] + CXType_Elaborated => "Elaborated", _ => "?" } } |