We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c360261 commit 7863893Copy full SHA for 7863893
src/ir/var.rs
@@ -162,7 +162,15 @@ fn handle_function_macro(
162
let left = String::from_utf8(left.concat())
163
.map_err(|_| ParseError::Continue)?;
164
let right: Vec<_> = right.iter().map(Vec::as_slice).collect();
165
- func_macro(&left, &right);
+ // Drop last token with LLVM < 4.0, due to an LLVM bug.
166
+ //
167
+ // See:
168
+ // https://bugs.llvm.org//show_bug.cgi?id=9069
169
+ let right = match (right.len(), crate::clang_version().parsed) {
170
+ (len, Some((v, _))) if len > 0 && v < 4 => &right[..len - 1],
171
+ _ => &right[..],
172
+ };
173
+ func_macro(&left, right);
174
175
// We handled the macro, skip future macro processing.
176
Err(ParseError::Continue)
0 commit comments