diff options
author | Shuai Wang <shuaiwang@google.com> | 2018-09-11 22:59:46 +0000 |
---|---|---|
committer | Shuai Wang <shuaiwang@google.com> | 2018-09-11 22:59:46 +0000 |
commit | f21e8ebb917bae5fb73871b076de6f3b01f47a2a (patch) | |
tree | f6b4405ff7f9d8f47c4497dcc337ea4b2c411129 /clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp | |
parent | 96bd44b3d71ecc09f318e0d4d598fc9347822306 (diff) | |
download | llvm-f21e8ebb917bae5fb73871b076de6f3b01f47a2a.zip llvm-f21e8ebb917bae5fb73871b076de6f3b01f47a2a.tar.gz llvm-f21e8ebb917bae5fb73871b076de6f3b01f47a2a.tar.bz2 |
[clangtidy] Remove old copy of ExprMutationAnalyzer
Summary:
This is 2/2 of moving ExprMutationAnalyzer from clangtidy to clang/Analysis.
ExprMutationAnalyzer is moved to clang/Analysis in D51948.
This diff migrates existing usages within clangtidy to point to the new
location and remove the old copy of ExprMutationAnalyzer.
Reviewers: george.karpenkov, JonasToth
Reviewed By: george.karpenkov
Subscribers: mgorny, a.sidorin, Szelethus, cfe-commits
Differential Revision: https://reviews.llvm.org/D51950
llvm-svn: 342006
Diffstat (limited to 'clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp b/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp index 63b853d..29a8b84 100644 --- a/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp +++ b/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp @@ -10,10 +10,10 @@ #include "UnnecessaryValueParamCheck.h" #include "../utils/DeclRefExprUtils.h" -#include "../utils/ExprMutationAnalyzer.h" #include "../utils/FixItHintUtils.h" #include "../utils/Matchers.h" #include "../utils/TypeTraits.h" +#include "clang/Analysis/Analyses/ExprMutationAnalyzer.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Lex/Lexer.h" #include "clang/Lex/Preprocessor.h" @@ -95,14 +95,14 @@ void UnnecessaryValueParamCheck::check(const MatchFinder::MatchResult &Result) { // Do not trigger on non-const value parameters when they are mutated either // within the function body or within init expression(s) when the function is // a ctor. - if (utils::ExprMutationAnalyzer(*Function->getBody(), *Result.Context) + if (ExprMutationAnalyzer(*Function->getBody(), *Result.Context) .isMutated(Param)) return; // CXXCtorInitializer might also mutate Param but they're not part of function // body, so check them separately here. if (const auto *Ctor = dyn_cast<CXXConstructorDecl>(Function)) { for (const auto *Init : Ctor->inits()) { - if (utils::ExprMutationAnalyzer(*Init->getInit(), *Result.Context) + if (ExprMutationAnalyzer(*Init->getInit(), *Result.Context) .isMutated(Param)) return; } |