Author: d0k Date: Sun Mar 20 09:24:49 2016 New Revision: 263900 URL: http://llvm.org/viewvc/llvm-project?rev=263900&view=rev Log: [clang-tidy] Update check for API change in r263895.
for range stmts now have split begin and ends, just apply OR to the condition. Should unbreak the build. Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.cpp Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.cpp?rev=263900&r1=263899&r2=263900&view=diff ============================================================================== --- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.cpp (original) +++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.cpp Sun Mar 20 09:24:49 2016 @@ -18,8 +18,10 @@ namespace tidy { AST_MATCHER_P(CXXForRangeStmt, hasRangeBeginEndStmt, ast_matchers::internal::Matcher<DeclStmt>, InnerMatcher) { - const DeclStmt *const Stmt = Node.getBeginEndStmt(); - return (Stmt != nullptr && InnerMatcher.matches(*Stmt, Finder, Builder)); + for (const DeclStmt *Stmt : {Node.getBeginStmt(), Node.getEndStmt()}) + if (Stmt != nullptr && InnerMatcher.matches(*Stmt, Finder, Builder)) + return true; + return false; } AST_MATCHER(Stmt, isInsideOfRangeBeginEndStmt) { _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits