]> granicus.if.org Git - clang/commit
[ASTMatchers] Do not try to memoize nodes we can't compare.
authorSamuel Benzaquen <sbenza@google.com>
Tue, 19 Apr 2016 15:52:56 +0000 (15:52 +0000)
committerSamuel Benzaquen <sbenza@google.com>
Tue, 19 Apr 2016 15:52:56 +0000 (15:52 +0000)
commit729060f60b59e21c99925aca1f60c33a287699a8
treec1585fec641560ac7a1beb13bf7c2d37ceb5c9c8
parent268cc8e48c1328a101bb5e4da91b8a78ba8a3ef4
[ASTMatchers] Do not try to memoize nodes we can't compare.

Summary:
Prevent hasAncestor from comparing nodes that are not supported.
hasDescendant was fixed some time ago to avoid this problem.
I'm applying the same fix to hasAncestor: if any object in the Builder map is
not comparable, skip the cache.

Reviewers: alexfh

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D19231

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