Skip to content

Commit e9fdc68

Browse files
authored
[Clang][NFC] Remove unnecessary copy (#97902)
Reported by Static Analyzer Tool: In clang::ASTNodeImporter::VisitCountAttributedType(clang::CountAttributedType const *): Using the auto keyword without an & causes the copy of an object of type TypeCoupledDeclRefInfo
1 parent 351a4b2 commit e9fdc68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/AST/ASTImporter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,7 @@ ASTNodeImporter::VisitCountAttributedType(const CountAttributedType *T) {
15511551
Expr *CountExpr = importChecked(Err, T->getCountExpr());
15521552

15531553
SmallVector<TypeCoupledDeclRefInfo, 1> CoupledDecls;
1554-
for (auto TI : T->dependent_decls()) {
1554+
for (const TypeCoupledDeclRefInfo &TI : T->dependent_decls()) {
15551555
Expected<ValueDecl *> ToDeclOrErr = import(TI.getDecl());
15561556
if (!ToDeclOrErr)
15571557
return ToDeclOrErr.takeError();

0 commit comments

Comments
 (0)