This is an archive of the discontinued LLVM Phabricator instance.

ASTMatchers: Keep AllCallbacks in a set instead of a vector
ClosedPublic

Authored by djasper on Oct 7 2015, 11:02 AM.

Details

Reviewers
klimek
Summary

AllCallbacks is currently only used to call onStartOfTranslationUnit and onEndOfTranslationUnit on them. In this (and any other scenario I can come up with), it is important (or at least better) not to have duplicates in this container. E.g. currently onEndOfTranslationUnit is called repeatedly on the same callback for every matcher that is registered with it.

Diff Detail

Event Timeline

djasper updated this revision to Diff 36770.Oct 7 2015, 11:02 AM
djasper retitled this revision from to ASTMatchers: Keep AllCallbacks in a set instead of a vector.
djasper updated this object.
djasper added a reviewer: klimek.
djasper added a subscriber: cfe-commits.
klimek accepted this revision.Oct 7 2015, 12:34 PM
klimek edited edge metadata.

That makes a lot of sense. LG

This revision is now accepted and ready to land.Oct 7 2015, 12:34 PM
djasper closed this revision.Oct 7 2015, 12:58 PM

Submitted as r249598.