Fixes another hard to test problem with iterator invalidation.
authorManuel Klimek <klimek@google.com>
Tue, 16 Jul 2013 13:20:30 +0000 (13:20 +0000)
committerManuel Klimek <klimek@google.com>
Tue, 16 Jul 2013 13:20:30 +0000 (13:20 +0000)
commit55d8fb56d34f550a54f2920e67e0bfdbe0ca20bc
treed696316f2e6fe5c7cfb79b21d439ce333e7a322f
parentaf4806f719f65b18f88a958738a28982ceb28fb6
Fixes another hard to test problem with iterator invalidation.

As every match call can recursively call back into the memoized match
via a nested traversal matcher (for example:
stmt(hasAncestor(stmt(hasDescendant(stmt(hasDescendant(stmt()))))))),
and every memoization step might clear the cache, we must not store
iterators into the result cache when calling match on a submatcher.

llvm-svn: 186411
clang/lib/ASTMatchers/ASTMatchFinder.cpp