diff options
-rw-r--r-- | src/ir/function.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ir/function.rs b/src/ir/function.rs index e811a721..93a8d89f 100644 --- a/src/ir/function.rs +++ b/src/ir/function.rs @@ -377,9 +377,14 @@ impl FunctionSig { return Err(ParseError::Continue); } - // Don't parse operatorxx functions in C++ let spelling = cursor.spelling(); - if spelling.starts_with("operator") { + + // Don't parse operatorxx functions in C++ + let is_operator = |spelling: &str| { + spelling.starts_with("operator") && + !clang::is_valid_identifier(spelling) + }; + if is_operator(&spelling) { return Err(ParseError::Continue); } |