]> granicus.if.org Git - clang/commit
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)
commit5f574bf631e973546f6f2c4484cb8ca6480b91d5
treed02d18df7bb34f1e89c1be9298a5a4f8dfc78405
parente7d3bff31e3ef4fea1e2a5a7cd5441b6b0752e3f
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186411 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ASTMatchers/ASTMatchFinder.cpp