Skip to content

Commit 6e0a913

Browse files
authored
[Clang][NFC] Remove unnecessary copy (llvm#100688)
Reported by Static Analyzer Tool: In Sema::checkIncorrectVTablePointerAuthenticationAttribute(): Using the auto keyword without an & causes the copy of an object of type CXXBaseSpecifier.
1 parent 8322a30 commit 6e0a913

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Sema/SemaDeclCXX.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -10385,7 +10385,7 @@ void Sema::checkIncorrectVTablePointerAuthenticationAttribute(
1038510385
while (1) {
1038610386
assert(PrimaryBase);
1038710387
const CXXRecordDecl *Base = nullptr;
10388-
for (auto BasePtr : PrimaryBase->bases()) {
10388+
for (const CXXBaseSpecifier &BasePtr : PrimaryBase->bases()) {
1038910389
if (!BasePtr.getType()->getAsCXXRecordDecl()->isDynamicClass())
1039010390
continue;
1039110391
Base = BasePtr.getType()->getAsCXXRecordDecl();

0 commit comments

Comments
 (0)