]> granicus.if.org Git - clang/commit
Prevent assert in ASTMatchFinder.
authorDaniel Jasper <djasper@google.com>
Wed, 23 Jul 2014 13:17:47 +0000 (13:17 +0000)
committerDaniel Jasper <djasper@google.com>
Wed, 23 Jul 2014 13:17:47 +0000 (13:17 +0000)
commitd33130402939b8fec404b8b34ad3377594e26352
treec9a9a07332479250e98586009c799bd6bcf3ca95
parent5a6d4817ec4d2556a85a48d4c26e88337a00331e
Prevent assert in ASTMatchFinder.

If nodes without memoization data (e.g. TypeLocs) are bound to specific
names, that effectively prevents memoization as those elements cannot be
compared effectively. If it is tried anyway, this can lead to an assert
as demonstrated in the new test.

In the long term, the better solution will be to enable DynTypedNodes
without memoization data. For now, simply skip memoization instead.

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