diff options
author | Darren Kulp <darren@kulp.ch> | 2020-06-19 20:12:00 -0700 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2020-07-20 18:55:10 +0200 |
commit | 7427017a5311cd683faca4402ba68d704310ad73 (patch) | |
tree | 303cddc4f0ea97e14bf9a8919cd091b0755f426a | |
parent | 1bfb3ad051fee3e19a4d2f8d5bb9144fded543cb (diff) |
Stop accommodating libclang < 3.8
-rw-r--r-- | src/clang.rs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/clang.rs b/src/clang.rs index 3ddf99dc..440f115e 100644 --- a/src/clang.rs +++ b/src/clang.rs @@ -77,13 +77,10 @@ impl Cursor { } } - /// Gets the C++ manglings for this cursor, or an error if the function is - /// not loaded or the manglings are not available. + /// Gets the C++ manglings for this cursor, or an error if the manglings + /// are not available. pub fn cxx_manglings(&self) -> Result<Vec<String>, ()> { use clang_sys::*; - if !clang_Cursor_getCXXManglings::is_loaded() { - return Err(()); - } unsafe { let manglings = clang_Cursor_getCXXManglings(self.x); if manglings.is_null() { @@ -592,11 +589,7 @@ impl Cursor { /// Get the visibility of this cursor's referent. pub fn visibility(&self) -> CXVisibilityKind { - if clang_getCursorVisibility::is_loaded() { - unsafe { clang_getCursorVisibility(self.x) } - } else { - CXVisibility_Default - } + unsafe { clang_getCursorVisibility(self.x) } } /// Given that this cursor's referent is a function, return cursors to its @@ -641,8 +634,7 @@ impl Cursor { /// Is this cursor's referent a field declaration that is marked as /// `mutable`? pub fn is_mutable_field(&self) -> bool { - clang_CXXField_isMutable::is_loaded() && - unsafe { clang_CXXField_isMutable(self.x) != 0 } + unsafe { clang_CXXField_isMutable(self.x) != 0 } } /// Get the offset of the field represented by the Cursor. |