diff options
author | Tim Shen <timshen91@gmail.com> | 2016-06-21 20:11:20 +0000 |
---|---|---|
committer | Tim Shen <timshen91@gmail.com> | 2016-06-21 20:11:20 +0000 |
commit | 325c7274809b637e86a8e81e7c78667d939440a8 (patch) | |
tree | fee29116dba10672bf21056fc5fdf9d145f7c099 /clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp | |
parent | 8b65f102cd4c5a066195de00379f74411d8c7fcb (diff) | |
download | bcm5719-llvm-325c7274809b637e86a8e81e7c78667d939440a8.tar.gz bcm5719-llvm-325c7274809b637e86a8e81e7c78667d939440a8.zip |
Fix clang-tidy patterns to adapt to newly added ExprWithCleanups nodes.
Summary: This is a fix for the new ExprWithCleanups introduced by clang's temporary variable lifetime marks change.
Reviewers: bkramer, sbenza, angelgarcia, alexth
Subscribers: rsmith, cfe-commits
Differential Revision: http://reviews.llvm.org/D21243
llvm-svn: 273310
Diffstat (limited to 'clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp')
-rw-r--r-- | clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp b/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp index bd476dd5e79..ad922382fcd 100644 --- a/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "LoopConvertCheck.h" +#include "../utils/Matchers.h" #include "clang/AST/ASTContext.h" #include "clang/ASTMatchers/ASTMatchFinder.h" @@ -141,10 +142,10 @@ StatementMatcher makeIteratorLoopMatcher() { StatementMatcher IteratorComparisonMatcher = expr( ignoringParenImpCasts(declRefExpr(to(varDecl().bind(ConditionVarName))))); - StatementMatcher OverloadedNEQMatcher = + auto OverloadedNEQMatcher = matchers::ignoringImplicit( cxxOperatorCallExpr(hasOverloadedOperatorName("!="), argumentCountIs(2), hasArgument(0, IteratorComparisonMatcher), - hasArgument(1, IteratorBoundMatcher)); + hasArgument(1, IteratorBoundMatcher))); // This matcher tests that a declaration is a CXXRecordDecl that has an // overloaded operator*(). If the operator*() returns by value instead of by |