summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/performance/ForRangeCopyCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/performance/ForRangeCopyCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/performance/ForRangeCopyCheck.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang-tools-extra/clang-tidy/performance/ForRangeCopyCheck.cpp b/clang-tools-extra/clang-tidy/performance/ForRangeCopyCheck.cpp
index 0a3cc4f6b42..d60a2f349f6 100644
--- a/clang-tools-extra/clang-tidy/performance/ForRangeCopyCheck.cpp
+++ b/clang-tools-extra/clang-tidy/performance/ForRangeCopyCheck.cpp
@@ -9,9 +9,9 @@
#include "ForRangeCopyCheck.h"
#include "../utils/DeclRefExprUtils.h"
-#include "../utils/ExprMutationAnalyzer.h"
#include "../utils/FixItHintUtils.h"
#include "../utils/TypeTraits.h"
+#include "clang/Analysis/Analyses/ExprMutationAnalyzer.h"
using namespace clang::ast_matchers;
@@ -88,8 +88,7 @@ bool ForRangeCopyCheck::handleCopyIsOnlyConstReferenced(
// Because the fix (changing to `const auto &`) will introduce an unused
// compiler warning which can't be suppressed.
// Since this case is very rare, it is safe to ignore it.
- if (!utils::ExprMutationAnalyzer(*ForRange.getBody(), Context)
- .isMutated(&LoopVar) &&
+ if (!ExprMutationAnalyzer(*ForRange.getBody(), Context).isMutated(&LoopVar) &&
!utils::decl_ref_expr::allDeclRefExprs(LoopVar, *ForRange.getBody(),
Context)
.empty()) {
OpenPOWER on IntegriCloud