]> granicus.if.org Git - clang/commit
ASTMatchers: Keep AllCallbacks in a set instead of a vector
authorDaniel Jasper <djasper@google.com>
Wed, 7 Oct 2015 19:56:12 +0000 (19:56 +0000)
committerDaniel Jasper <djasper@google.com>
Wed, 7 Oct 2015 19:56:12 +0000 (19:56 +0000)
commit8321b1590d52d5715d8af3cd729db845cfdd1dda
tree679b5953b926efb1cc804ffb422d411f6cb428de
parent8c622f1ee1c94726c23a7e391029174679dbacf5
ASTMatchers: Keep AllCallbacks in a set instead of a vector

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.

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