summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.h
diff options
context:
space:
mode:
authorEtienne Bergeron <etienneb@google.com>2016-07-07 04:03:05 +0000
committerEtienne Bergeron <etienneb@google.com>2016-07-07 04:03:05 +0000
commit00639bc5296194636a37156a90f8f9edb2b0dda8 (patch)
tree955209acb12a45b60759bde8fde79f31807d0212 /clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.h
parent287956f72b9915be9db1ffc37c7655e5d65473ae (diff)
downloadbcm5719-llvm-00639bc5296194636a37156a90f8f9edb2b0dda8.tar.gz
bcm5719-llvm-00639bc5296194636a37156a90f8f9edb2b0dda8.zip
[clang-tidy] Enhance redundant-expression check
Summary: This patch is adding support to recognize more complex redundant expressions. Reviewers: alexfh Subscribers: aaron.ballman, cfe-commits, chrisha Differential Revision: http://reviews.llvm.org/D21392 llvm-svn: 274731
Diffstat (limited to 'clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.h')
-rw-r--r--clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.h b/clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.h
index 80460a63d09..59d2c8f9598 100644
--- a/clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.h
+++ b/clang-tools-extra/clang-tidy/misc/RedundantExpressionCheck.h
@@ -26,6 +26,11 @@ public:
: ClangTidyCheck(Name, Context) {}
void registerMatchers(ast_matchers::MatchFinder *Finder) override;
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
+
+private:
+ void checkArithmeticExpr(const ast_matchers::MatchFinder::MatchResult &R);
+ void checkBitwiseExpr(const ast_matchers::MatchFinder::MatchResult &R);
+ void checkRelationalExpr(const ast_matchers::MatchFinder::MatchResult &R);
};
} // namespace misc
OpenPOWER on IntegriCloud