Skip to content

Commit f526417

Browse files
committed
fixes
1 parent 32ebfed commit f526417

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clang-tools-extra/clang-tidy/performance/LostStdMoveCheck.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void LostStdMoveCheck::registerMatchers(MatchFinder *Finder) {
6363
const Expr *LostStdMoveCheck::getLastVarUsage(const VarDecl &Var,
6464
const Decl &Func,
6565
ASTContext &Context) {
66-
auto Exprs = allDeclRefExprs(Var, Func, Context);
66+
llvm::SmallPtrSet<const DeclRefExpr *, 16> Exprs = allDeclRefExprs(Var, Func, Context);
6767

6868
const Expr *LastExpr = nullptr;
6969
for (const auto &Expr : Exprs) {
@@ -95,7 +95,7 @@ void LostStdMoveCheck::check(const MatchFinder::MatchResult &Result) {
9595
if (MatchedUseCall)
9696
return;
9797

98-
const auto *LastUsage =
98+
const Expr *LastUsage =
9999
getLastVarUsage(*MatchedDecl, *MatchedFunc, *Result.Context);
100100
if (LastUsage == nullptr)
101101
return;

clang-tools-extra/docs/ReleaseNotes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ New checks
133133
- New :doc:`performance-lost-std-move
134134
<clang-tidy/checks/performance/lost-std-move>` check.
135135

136-
Searches for lost std::move().
136+
Searches for lost ``std::move()``.
137137

138138
- New :doc:`readability-ambiguous-smartptr-reset-call
139139
<clang-tidy/checks/readability/ambiguous-smartptr-reset-call>` check.

0 commit comments

Comments
 (0)