Skip to content

Commit f6bfec7

Browse files
committed
Use SkipImplicit in ExprKey
1 parent 56198bf commit f6bfec7

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎cpp2rust/converter/rules/rules_loader.cpp‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,10 +473,7 @@ std::string DeclKey(const clang::NamedDecl *decl) {
473473
}
474474

475475
std::string ExprKey(clang::ASTContext &ctx, const clang::Expr *expr) {
476-
for (auto inner = expr->IgnoreParens()->IgnoreImplicit(); inner != expr;
477-
inner = expr->IgnoreParens()->IgnoreImplicit()) {
478-
expr = inner;
479-
}
476+
expr = RuleDecls::SkipImplicit(expr);
480477
if (auto cast = llvm::dyn_cast<clang::ExplicitCastExpr>(expr)) {
481478
return ExprKey(ctx, cast->getSubExpr());
482479
}

0 commit comments

Comments
 (0)