@@ -1265,7 +1265,7 @@ void Converter::ConvertPrintf(clang::CallExpr *expr) {
12651265 Mapper::ToString (expr->getCallee ()).starts_with (" int fprintf" );
12661266
12671267 StrCat (" printf(" );
1268- for (auto i = is_fprintf ? 1 : 0 ; i < expr->getNumArgs (); i++ ) {
1268+ for (unsigned i = is_fprintf; i < expr->getNumArgs (); ++i ) {
12691269 if (i == is_fprintf ? 1 : 0 ) {
12701270 Convert (expr->getArg (i));
12711271 StrCat (" as *const i8" );
@@ -2008,7 +2008,7 @@ bool Converter::VisitDeclRefExpr(clang::DeclRefExpr *expr) {
20082008 // Wrap unsafe function in safe closure because the Fn trait only accepts
20092009 // safe functions
20102010 std::string arguments;
2011- for (unsigned i = 0 ; i < function->getNumParams (); i++ ) {
2011+ for (unsigned i = 0 ; i < function->getNumParams (); ++i ) {
20122012 arguments += (i ? " , a" : " a" ) + std::to_string (i);
20132013 }
20142014 StrCat (" Rc::new" , token::kOpenParen );
@@ -2255,7 +2255,7 @@ bool Converter::VisitInitListExpr(clang::InitListExpr *expr) {
22552255 (arr_ty->getSize ().getZExtValue () - expr->getNumInits ()) &&
22562256 " Number of initializers should be less that total size of array" );
22572257 for (unsigned i = 0 ;
2258- i < arr_ty->getSize ().getZExtValue () - expr->getNumInits (); i++ ) {
2258+ i < arr_ty->getSize ().getZExtValue () - expr->getNumInits (); ++i ) {
22592259 ConvertVarInit (expr->getArrayFiller ()->getType (),
22602260 expr->getArrayFiller ());
22612261 StrCat (token::kComma );
@@ -2623,7 +2623,7 @@ Converter::GetFunctionPointerDefaultAsString(clang::QualType qual_type) {
26232623 auto proto = qual_type->getPointeeType ()->getAs <clang::FunctionProtoType>();
26242624 assert (proto);
26252625 ret = " Rc::new(|" ;
2626- for (unsigned i = 0 ; i < proto->getNumParams (); i++ ) {
2626+ for (unsigned i = 0 ; i < proto->getNumParams (); ++i ) {
26272627 ret += " _," ;
26282628 }
26292629 ret += R"( | { panic!("ub: uninit function pointer") }))" ;
0 commit comments