[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-16 Thread via cfe-commits
https://github.com/smanna12 edited https://github.com/llvm/llvm-project/pull/97902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-16 Thread via cfe-commits
@@ -1551,7 +1551,7 @@ ASTNodeImporter::VisitCountAttributedType(const CountAttributedType *T) { Expr *CountExpr = importChecked(Err, T->getCountExpr()); SmallVector CoupledDecls; - for (auto TI : T->dependent_decls()) { + for (const TypeCoupledDeclRefInfo &TI : T->depen

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-16 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/97902 >From 1f80c0a172b58ad15d6b1dce02b63ac682bc7dc0 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Sat, 6 Jul 2024 09:03:15 -0700 Subject: [PATCH 1/5] [Clang] Remove unnecessary copy Reported by Static Analyzer

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-16 Thread via cfe-commits
https://github.com/smanna12 deleted https://github.com/llvm/llvm-project/pull/97902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-16 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 edited https://github.com/llvm/llvm-project/pull/97902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-16 Thread Youngsuk Kim via cfe-commits
@@ -1551,7 +1551,7 @@ ASTNodeImporter::VisitCountAttributedType(const CountAttributedType *T) { Expr *CountExpr = importChecked(Err, T->getCountExpr()); SmallVector CoupledDecls; - for (auto TI : T->dependent_decls()) { + for (const TypeCoupledDeclRefInfo &TI : T->depen

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-16 Thread via cfe-commits
https://github.com/smanna12 edited https://github.com/llvm/llvm-project/pull/97902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-16 Thread via cfe-commits
@@ -1551,7 +1551,7 @@ ASTNodeImporter::VisitCountAttributedType(const CountAttributedType *T) { Expr *CountExpr = importChecked(Err, T->getCountExpr()); SmallVector CoupledDecls; - for (auto TI : T->dependent_decls()) { + for (const TypeCoupledDeclRefInfo &TI : T->depen

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-16 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna approved this pull request. Thanks for fixing this issue! I left a minor comment. Other than that, LGTM. https://github.com/llvm/llvm-project/pull/97902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-16 Thread Yeoul Na via cfe-commits
@@ -1551,7 +1551,7 @@ ASTNodeImporter::VisitCountAttributedType(const CountAttributedType *T) { Expr *CountExpr = importChecked(Err, T->getCountExpr()); SmallVector CoupledDecls; - for (auto TI : T->dependent_decls()) { + for (const TypeCoupledDeclRefInfo &TI : T->depen

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-16 Thread via cfe-commits
smanna12 wrote: Thank you, @cor3ntin for reviews! https://github.com/llvm/llvm-project/pull/97902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-16 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/97902 >From 1f80c0a172b58ad15d6b1dce02b63ac682bc7dc0 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Sat, 6 Jul 2024 09:03:15 -0700 Subject: [PATCH 1/4] [Clang] Remove unnecessary copy Reported by Static Analyzer

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-16 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/97902 >From 1f80c0a172b58ad15d6b1dce02b63ac682bc7dc0 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Sat, 6 Jul 2024 09:03:15 -0700 Subject: [PATCH 1/3] [Clang] Remove unnecessary copy Reported by Static Analyzer

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-16 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/97902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-16 Thread via cfe-commits
https://github.com/smanna12 edited https://github.com/llvm/llvm-project/pull/97902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-16 Thread via cfe-commits
@@ -1551,7 +1551,7 @@ ASTNodeImporter::VisitCountAttributedType(const CountAttributedType *T) { Expr *CountExpr = importChecked(Err, T->getCountExpr()); SmallVector CoupledDecls; - for (auto TI : T->dependent_decls()) { + for (const TypeCoupledDeclRefInfo &TI : T->depen

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-16 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/97902 >From 1f80c0a172b58ad15d6b1dce02b63ac682bc7dc0 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Sat, 6 Jul 2024 09:03:15 -0700 Subject: [PATCH 1/2] [Clang] Remove unnecessary copy Reported by Static Analyzer

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-06 Thread Youngsuk Kim via cfe-commits
@@ -1551,7 +1551,7 @@ ASTNodeImporter::VisitCountAttributedType(const CountAttributedType *T) { Expr *CountExpr = importChecked(Err, T->getCountExpr()); SmallVector CoupledDecls; - for (auto TI : T->dependent_decls()) { + for (const TypeCoupledDeclRefInfo &TI : T->depen

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (smanna12) Changes 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 TypeCoupledDeclRe

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-06 Thread via cfe-commits
https://github.com/smanna12 created https://github.com/llvm/llvm-project/pull/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 TypeCoupledDe