Skip to content

Commit c074019

Browse files
smanna12yuxuanchen1997
authored andcommitted
[Clang][NFC] Remove unnecessary copy (#97902)
Summary: 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 Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251598
1 parent 0bee044 commit c074019

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)