File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -8541,7 +8541,7 @@ class PointerParamInfoPrinter {
8541
8541
out << " sizedBy" ;
8542
8542
else
8543
8543
out << " countedBy" ;
8544
- out << " (pointer: " << pointerIndex << " , " ;
8544
+ out << " (pointer: " << pointerIndex + 1 << " , " ;
8545
8545
if (isSizedBy)
8546
8546
out << " size" ;
8547
8547
else
@@ -8568,13 +8568,11 @@ void ClangImporter::Implementation::importBoundsAttributes(
8568
8568
{
8569
8569
llvm::raw_svector_ostream out (MacroString);
8570
8570
8571
- size_t parameterIndex = 1 ;
8572
8571
PointerParamInfoPrinter printer (getClangASTContext (), out);
8573
- for (auto param : ClangDecl->parameters ()) {
8572
+ for (auto [index, param] : llvm::enumerate ( ClangDecl->parameters () )) {
8574
8573
if (auto CAT = param->getType ()->getAs <clang::CountAttributedType>()) {
8575
- printer.printCountedBy (CAT, parameterIndex );
8574
+ printer.printCountedBy (CAT, index );
8576
8575
}
8577
- parameterIndex++;
8578
8576
}
8579
8577
}
8580
8578
You can’t perform that action at this time.
0 commit comments