diff options
author | Darren Kulp <darren@kulp.ch> | 2020-06-21 17:38:46 -0700 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2020-07-20 18:55:10 +0200 |
commit | 4ea1e21bccfd33d79a9244a849d1de0f8ac42b3b (patch) | |
tree | eec9d75b4ac1a8077784e54cbecdf2bf001ae7b1 /src/clang.rs | |
parent | f4f773b6110b6b845f38414febbf37a056cc40ed (diff) |
Simplify handle_function_macro for clang 3.9+
Diffstat (limited to 'src/clang.rs')
-rw-r--r-- | src/clang.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/clang.rs b/src/clang.rs index 9c09f71c..357a6dd5 100644 --- a/src/clang.rs +++ b/src/clang.rs @@ -237,14 +237,8 @@ impl Cursor { } /// Is this Cursor pointing to a function-like macro definition? - /// Returns None if this cannot be determined with the available libclang - /// (it requires 3.9 or greater). - pub fn is_macro_function_like(&self) -> Option<bool> { - if clang_Cursor_isMacroFunctionLike::is_loaded() { - Some(unsafe { clang_Cursor_isMacroFunctionLike(self.x) != 0 }) - } else { - None - } + pub fn is_macro_function_like(&self) -> bool { + unsafe { clang_Cursor_isMacroFunctionLike(self.x) != 0 } } /// Get the kind of referent this cursor is pointing to. |