summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/utils/ExprMutationAnalyzer.h
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2018-06-13 15:02:34 +0000
committerAaron Ballman <aaron@aaronballman.com>2018-06-13 15:02:34 +0000
commitc3fabd98d65ce53f722180f2916d9145c78cba47 (patch)
tree859aba75d17dc625295b69a0a3656fea5bb04a76 /clang-tools-extra/clang-tidy/utils/ExprMutationAnalyzer.h
parent9f3f18d6f6257621083032c1e74ed089ffb1e6b3 (diff)
downloadbcm5719-llvm-c3fabd98d65ce53f722180f2916d9145c78cba47.tar.gz
bcm5719-llvm-c3fabd98d65ce53f722180f2916d9145c78cba47.zip
Reverting r334604 due to failing tests.
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/31500 llvm-svn: 334606
Diffstat (limited to 'clang-tools-extra/clang-tidy/utils/ExprMutationAnalyzer.h')
-rw-r--r--clang-tools-extra/clang-tidy/utils/ExprMutationAnalyzer.h56
1 files changed, 0 insertions, 56 deletions
diff --git a/clang-tools-extra/clang-tidy/utils/ExprMutationAnalyzer.h b/clang-tools-extra/clang-tidy/utils/ExprMutationAnalyzer.h
deleted file mode 100644
index 256bb712891..00000000000
--- a/clang-tools-extra/clang-tidy/utils/ExprMutationAnalyzer.h
+++ /dev/null
@@ -1,56 +0,0 @@
-//===---------- ExprMutationAnalyzer.h - clang-tidy -----------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_EXPRMUTATIONANALYZER_H
-#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_EXPRMUTATIONANALYZER_H
-
-#include <type_traits>
-
-#include "clang/AST/AST.h"
-#include "clang/ASTMatchers/ASTMatchers.h"
-#include "llvm/ADT/DenseMap.h"
-
-namespace clang {
-namespace tidy {
-namespace utils {
-
-/// Analyzes whether any mutative operations are applied to an expression within
-/// a given statement.
-class ExprMutationAnalyzer {
-public:
- ExprMutationAnalyzer(const Stmt *Stm, ASTContext *Context)
- : Stm(Stm), Context(Context) {}
-
- bool isMutated(const Decl *Dec) { return findDeclMutation(Dec) != nullptr; }
- bool isMutated(const Expr *Exp) { return findMutation(Exp) != nullptr; }
- const Stmt *findMutation(const Expr *Exp);
-
-private:
- bool isUnevaluated(const Expr *Exp);
-
- const Stmt *findExprMutation(ArrayRef<ast_matchers::BoundNodes> Matches);
- const Stmt *findDeclMutation(ArrayRef<ast_matchers::BoundNodes> Matches);
- const Stmt *findDeclMutation(const Decl *Dec);
-
- const Stmt *findDirectMutation(const Expr *Exp);
- const Stmt *findMemberMutation(const Expr *Exp);
- const Stmt *findArrayElementMutation(const Expr *Exp);
- const Stmt *findCastMutation(const Expr *Exp);
- const Stmt *findRangeLoopMutation(const Expr *Exp);
- const Stmt *findReferenceMutation(const Expr *Exp);
-
- const Stmt *const Stm;
- ASTContext *const Context;
- llvm::DenseMap<const Expr *, const Stmt *> Results;
-};
-
-} // namespace utils
-} // namespace tidy
-} // namespace clang
-
-#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_EXPRMUTATIONANALYZER_H
OpenPOWER on IntegriCloud