timshen added inline comments.
================ Comment at: clang/lib/ASTMatchers/Dynamic/Marshallers.h:514 + MutableArrayRef<std::unique_ptr<MatcherDescriptor>> Callbacks) + : Overloads(std::make_move_iterator(Callbacks.begin()), + std::make_move_iterator(Callbacks.end())) {} ---------------- Notice that this is 2x slower, because move on unique_ptr resets the move-from side. But it is less likely to have an issue. ================ Comment at: clang/lib/ASTMatchers/Dynamic/Registry.cpp:501 for (const auto &M : RegistryData->constructors()) { - const auto *Matcher = M.getValue(); + const std::unique_ptr<const MatcherDescriptor>& Matcher = M.getValue(); StringRef Name = M.getKey(); ---------------- const MatcherDescriptor &Matcher = *M.getValue()? https://reviews.llvm.org/D25425 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits