]> granicus.if.org Git - clang/commit
Added the hasLoopVariable sub-matcher for forRangeStmt.
authorAlexander Kornienko <alexfh@google.com>
Wed, 5 Feb 2014 16:35:08 +0000 (16:35 +0000)
committerAlexander Kornienko <alexfh@google.com>
Wed, 5 Feb 2014 16:35:08 +0000 (16:35 +0000)
commit34d8851c4b5c9313e5e93be550a0763687bad854
tree71af585dcaa6a451acdbabecc6a21297d83d68ed
parente10417d32769ffd0fe201492fe80df07b7bee184
Added the hasLoopVariable sub-matcher for forRangeStmt.

Summary:
This sub-matcher makes it possible to access directly the range-based for
loop variable: forRangeStmt(hasLoopVariable(anything()).bind(...)).
I've tried to re-generate the docs, but the diffs seem to include much more than
this change could cause, so I'd better leave docs update to someone who knows
the intended changes in the contents better.

Reviewers: klimek

Reviewed By: klimek

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D2702

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200850 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/ASTMatchers/ASTMatchers.h
unittests/ASTMatchers/ASTMatchersTest.cpp