File tree 1 file changed +2
-4
lines changed
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ fn default_macro_constant_type(value: i64) -> IntKind {
134
134
/// Determines whether a set of tokens from a CXCursor_MacroDefinition
135
135
/// represent a function-like macro. If so, calls the func_macro callback
136
136
/// and returns `Err(ParseError::Continue)` to signal to skip further
137
- /// processing. If conversion to UTF-8 fails (it is performed only where it
137
+ /// processing. If conversion to UTF-8 fails (it is performed only where it
138
138
/// should be infallible), then `Err(ParseError::Continue)` is returned as well.
139
139
fn handle_function_macro (
140
140
cursor : & clang:: Cursor ,
@@ -154,9 +154,7 @@ fn handle_function_macro(
154
154
// If we have libclang >= 3.9, we can use `is_macro_function_like()` and
155
155
// avoid checking for abutting tokens ourselves.
156
156
cursor. is_macro_function_like ( ) . unwrap_or_else ( || {
157
- // cexpr explicitly does not handle function-like macros, except for
158
- // a degenerate case in which it behaves in a non-conformant way. We
159
- // prevent cexpr from ever seeing function-like macros by checking
157
+ // If we cannot get a definitive answer from clang, we instead check
160
158
// for a parenthesis token immediately adjacent to (that is,
161
159
// abutting) the first token in the macro definition.
162
160
match tokens. get ( 0 ..2 ) {
You can’t perform that action at this time.
0 commit comments