This is an archive of the discontinued LLVM Phabricator instance.

[ASTMatchers] Do not try to memoize nodes we can't compare.
ClosedPublic

Authored by sbenza on Apr 18 2016, 11:33 AM.

Details

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.

Diff Detail

Repository
rL LLVM

Event Timeline

sbenza updated this revision to Diff 54089.Apr 18 2016, 11:33 AM
sbenza retitled this revision from to [ASTMatchers] Do not try to memoize nodes we can't compare..
sbenza updated this object.
sbenza added a reviewer: alexfh.
sbenza added a subscriber: cfe-commits.
alexfh accepted this revision.Apr 18 2016, 4:30 PM
alexfh edited edge metadata.

Looks good. Thanks!

This revision is now accepted and ready to land.Apr 18 2016, 4:30 PM
This revision was automatically updated to reflect the committed changes.