Fix binding of nodes in case of forEach..() matchers.
When recursively visiting the generated matches, the aggregated bindings need to be copied during the recursion. Otherwise, we they might not be properly overwritten (which is shown by the test), or there might be bound nodes present that were bound on a different matching branch. Review: http://llvm-reviews.chandlerc.com/D112 llvm-svn: 167695
Showing
- clang/include/clang/ASTMatchers/ASTMatchersInternal.h 1 addition, 1 deletionclang/include/clang/ASTMatchers/ASTMatchersInternal.h
- clang/lib/ASTMatchers/ASTMatchersInternal.cpp 6 additions, 5 deletionsclang/lib/ASTMatchers/ASTMatchersInternal.cpp
- clang/unittests/ASTMatchers/ASTMatchersTest.cpp 11 additions, 0 deletionsclang/unittests/ASTMatchers/ASTMatchersTest.cpp
- clang/unittests/ASTMatchers/ASTMatchersTest.h 1 addition, 1 deletionclang/unittests/ASTMatchers/ASTMatchersTest.h
Loading
Please register or sign in to comment