Skip to content

Commit c65b95a

Browse files
committed
VaList check has higher priority
1 parent 3fddb9f commit c65b95a

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

cpp2rust/converter/converter.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,18 @@ bool Converter::VisitRecoveryExpr(clang::RecoveryExpr *expr) {
6363
}
6464

6565
bool Converter::Convert(clang::QualType qual_type) {
66-
if (Mapper::Contains(qual_type) &&
67-
Mapper::Map(qual_type) != ignore_rule_type_) {
68-
StrCat(Mapper::Map(qual_type));
69-
return false;
70-
}
71-
7266
// Catch va_list before desugaring
7367
if (IsVaListType(qual_type)) {
7468
StrCat("VaList");
7569
return false;
7670
}
7771

72+
if (Mapper::Contains(qual_type) &&
73+
Mapper::Map(qual_type) != ignore_rule_type_) {
74+
StrCat(Mapper::Map(qual_type));
75+
return false;
76+
}
77+
7878
qual_type = qual_type.getUnqualifiedType().getDesugaredType(ctx_);
7979
return TraverseType(qual_type);
8080
}

0 commit comments

Comments
 (0)